# pardnchiu/go-llm-router > A Go library that routes chat, image, and audio requests across 14 LLM providers through one Agent interface. Built by 邱敬幃 Pardn Chiu (pardnchiu). Maintained by 邱敬幃 Pardn Chiu (pardnchiu), Pardn Co., Ltd, Taiwan · Infrastructure Engineering. Source: https://github.com/pardnchiu/go-llm-router Full text in one file: [English](https://go-llm-router.pardn.io/llms-full.txt) · [中文](https://go-llm-router.pardn.io/zh/llms-full.txt) ## Overview - [Home](https://go-llm-router.pardn.io/index.md): A Go library that routes chat, image, and audio requests across 14 LLM providers through one Agent interface. Built by 邱敬幃 Pardn Chiu (pardnchiu). - [Getting Started](https://go-llm-router.pardn.io/getting-started.md): Install go-llm-router, resolve an Agent from a provider@model name, and send your first request with usage counters. ## Concepts - [Architecture](https://go-llm-router.pardn.io/architecture.md): How router.New, the provider adapters, the OAuth token store, and the shared stream and usage pipeline fit together. - [Agent Contract](https://go-llm-router.pardn.io/core-concepts.md): The single Agent interface every provider implements, plus the optional stream, reasoning, image, STT, and TTS capabilities. - [Model Routing](https://go-llm-router.pardn.io/core-concepts-routing.md): How router.New resolves provider@model names, rewrites unknown prefixes to compat, and lets you switch providers by name. - [Reasoning Levels](https://go-llm-router.pardn.io/core-concepts-reasoning.md): The six reasoning levels, their aliases, how they map to each vendor, and how out-of-range requests are clamped. - [Fast Mode](https://go-llm-router.pardn.io/core-concepts-fast-mode.md): How ModeFast maps to each vendor's priority tier, checking support with SupportFast, and the fast-tier downgrade warning. - [Tool Calls](https://go-llm-router.pardn.io/core-concepts-tool-calls.md): Declaring tools in the OpenAI shape with a raw JSON Schema, returning tool results, and echoing Gemini thought signatures. - [Streaming](https://go-llm-router.pardn.io/core-concepts-streaming.md): Consuming SendStream events normalized from Chat Completions and Responses SSE, and handling StreamError failures. - [Usage Normalization](https://go-llm-router.pardn.io/core-concepts-usage.md): How vendor token fields fold into one Usage struct and how cached tokens move from Input into CacheRead. - [Session Cache Keys](https://go-llm-router.pardn.io/core-concepts-sessions.md): How WithSessionID becomes a prompt_cache_key or session header for OpenAI, Codex, Grok, and Cloudflare. ## Media and Models - [Image Generation](https://go-llm-router.pardn.io/core-concepts-images.md): Picking image models by provider@model, calling GenerateImage, and how ImageOptions aspect ratio and size map per vendor. - [Speech Output](https://go-llm-router.pardn.io/core-concepts-speech.md): Default TTS voices, supported output formats per provider, and local OpenRouter voice validation. - [Model Filters](https://go-llm-router.pardn.io/core-concepts-model-filters.md): Listing models with TextOnly, STTOnly, TTSOnly, and ImageOnly filters, marker rules, and per-provider flag support. ## Configuration - [Provider Credentials](https://go-llm-router.pardn.io/configuration.md): The router.Config fields and which API key, OAuth token, base URL, or Cloudflare IDs each provider prefix requires. - [OAuth Tokens](https://go-llm-router.pardn.io/configuration-oauth.md): Keychain keys, login flows, legacy key fallback, and automatic refresh for Copilot, Codex, and Grok OAuth tokens. - [Custom Endpoints](https://go-llm-router.pardn.io/configuration-endpoints.md): Pointing go-llm-router at self-hosted or third-party OpenAI-compatible endpoints and Cloudflare Workers AI Gateway. - [Timeouts and Limits](https://go-llm-router.pardn.io/configuration-limits.md): Request, response-header, and listing timeouts plus stream and error body read caps. - [Balance and Quota](https://go-llm-router.pardn.io/configuration-quota.md): Which provider packages report remaining credits, balance, or quota percentage, and what each value means. ## Reference - [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md): Signatures of Agent and its optional interfaces, router.Config and router.New, and each provider package's exports. - [Message Types](https://go-llm-router.pardn.io/api-reference-messages.md): Fields of Message, ContentPart, Tool, ToolCall, ToolCallFunction, Output, OutputChoices, and Usage. - [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md): Reasoning and Mode constants plus ParseReasoning, ClampReasoning, OpenAIEffortRange, SupportFast, and WarnFastDowngrade. - [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md): ModelFilter, ModelInfo, the IsTextModel family of classifiers, and MatchModelFilter signatures. - [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md): StreamEvent, StreamError, ErrStreamUnsupported, SSE helpers like OpenStream and ScanSSE, and read-cap constants. - [Image Types](https://go-llm-router.pardn.io/api-reference-images.md): ImageOptions and ImageResult, image endpoints and output formats per provider, ImagePixelSize and DataURI. - [Audio Types](https://go-llm-router.pardn.io/api-reference-audio.md): STT and TTS option and result types, audio endpoints per provider, and the PCMRate and WrapPCM16 helpers. - [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md): Load, HasToken, ClearToken, LoginWithCallback, and EnsureFresh across the Copilot, Codex, and Grok OAuth packages. - [Helpers](https://go-llm-router.pardn.io/api-reference-helpers.md): NewHTTPClient, SupportTemperature, ResponsesAPI, summary.VoiceReply, and the WithSessionID session helpers. - [Removed APIs](https://go-llm-router.pardn.io/api-reference-removed.md): Exported go-llm-router symbols removed since v0.2.0, the release that removed each, and its replacement. ## Symbols Exported symbol -> page that documents it. - `Agent` (core, core/claude, core/cloudflare, core/compat, core/copilot, core/deepseek, core/gemini, core/grok, core/grokOauth, core/mistral, core/nvidia, core/ollamaCloud, core/openRouter, core/openai, core/openaiCodex): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md), [Getting Started](https://go-llm-router.pardn.io/getting-started.md) - `BuildBody` (core/xai): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `ClampReasoning` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md) - `ClearToken` (core/oauth/codex, core/oauth/copilot, core/oauth/grok): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md) - `CloudFlareModels` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md) - `CodexToken` (core): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md), [Provider Credentials](https://go-llm-router.pardn.io/configuration.md) - `Config` (core, core/router): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md), [Provider Credentials](https://go-llm-router.pardn.io/configuration.md) - `Content` (core/claude, core/gemini): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `ContentPart` (core): [Message Types](https://go-llm-router.pardn.io/api-reference-messages.md) - `ConvertInput` (core/copilot/response): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `ConvertOutput` (core/copilot/response): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `ConvertTools` (core/copilot/response): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `CopilotModels` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md) - `CopilotRefreshToken` (core): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md) - `CopilotToken` (core): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md), [Provider Credentials](https://go-llm-router.pardn.io/configuration.md) - `DataURI` (core): [Image Types](https://go-llm-router.pardn.io/api-reference-images.md) - `DeviceCode` (core/oauth/copilot): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md), [OAuth Tokens](https://go-llm-router.pardn.io/configuration-oauth.md) - `EnsureFresh` (core/oauth/codex, core/oauth/grok): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md), [OAuth Tokens](https://go-llm-router.pardn.io/configuration-oauth.md) - `EnsureFreshSession` (core/oauth/copilot): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md), [OAuth Tokens](https://go-llm-router.pardn.io/configuration-oauth.md) - `ErrorBodyLimit` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md), [Timeouts and Limits](https://go-llm-router.pardn.io/configuration-limits.md) - `ErrorFrameLimit` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `ErrStreamUnsupported` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md), [Agent Contract](https://go-llm-router.pardn.io/core-concepts.md) - `FunctionCall` (core/gemini): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `FunctionResponse` (core/gemini): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `GeminiModels` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md) - `GopilotAccessToken` (core/oauth/copilot): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md) - `GrokToken` (core): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md), [Provider Credentials](https://go-llm-router.pardn.io/configuration.md) - `HasToken` (core/oauth/codex, core/oauth/copilot, core/oauth/grok): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md) - `ImageAgent` (core): [Agent Contract](https://go-llm-router.pardn.io/core-concepts.md) - `ImageInput` (core/openai): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `ImageInstructions` (core/openai): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `ImageOptions` (core): [Image Types](https://go-llm-router.pardn.io/api-reference-images.md), [Image Generation](https://go-llm-router.pardn.io/core-concepts-images.md) - `ImagePixelSize` (core): [Image Types](https://go-llm-router.pardn.io/api-reference-images.md) - `ImageURL` (core): [Message Types](https://go-llm-router.pardn.io/api-reference-messages.md) - `InlineData` (core/gemini): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `IsImageModel` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md) - `IsSTTModel` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md) - `IsTextModel` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md) - `IsTTSModel` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md) - `JSONBodyLimit` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `Load` (core/oauth/codex, core/oauth/copilot, core/oauth/grok): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md), [OAuth Tokens](https://go-llm-router.pardn.io/configuration-oauth.md) - `LoginWithCallback` (core/oauth/codex, core/oauth/copilot, core/oauth/grok): [OAuth Functions](https://go-llm-router.pardn.io/api-reference-oauth.md), [OAuth Tokens](https://go-llm-router.pardn.io/configuration-oauth.md) - `MatchModelFilter` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md) - `Message` (core): [Message Types](https://go-llm-router.pardn.io/api-reference-messages.md), [Architecture](https://go-llm-router.pardn.io/architecture.md) - `MistralModels` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md) - `Mode` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Getting Started](https://go-llm-router.pardn.io/getting-started.md) - `ModeDefault` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md) - `ModeFast` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Fast Mode](https://go-llm-router.pardn.io/core-concepts-fast-mode.md) - `ModelFilter` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md), [Model Filters](https://go-llm-router.pardn.io/core-concepts-model-filters.md) - `ModelInfo` (core): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md), [Model Filters](https://go-llm-router.pardn.io/core-concepts-model-filters.md) - `ModelInfos` (core/copilot, core/gemini, core/mistral): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `Models` (core, core/claude, core/cloudflare, core/copilot, core/deepseek, core/gemini, core/grok, core/grokOauth, core/mistral, core/nvidia, core/ollamaCloud, core/openRouter, core/openai, core/openaiCodex): [Model Filter Symbols](https://go-llm-router.pardn.io/api-reference-model-filters.md), [Timeouts and Limits](https://go-llm-router.pardn.io/configuration-limits.md) - `New` (core/claude, core/cloudflare, core/compat, core/copilot, core/deepseek, core/gemini, core/grok, core/grokOauth, core/mistral, core/nvidia, core/ollamaCloud, core/openRouter, core/openai, core/openaiCodex, core/router): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md), [Model Routing](https://go-llm-router.pardn.io/core-concepts-routing.md) - `NewHTTPClient` (core): [Helpers](https://go-llm-router.pardn.io/api-reference-helpers.md), [Architecture](https://go-llm-router.pardn.io/architecture.md) - `OpenAIEffortRange` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md) - `OpenStream` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `Output` (core, core/claude, core/copilot/response, core/gemini): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md), [Usage Normalization](https://go-llm-router.pardn.io/core-concepts-usage.md) - `OutputChoices` (core): [Message Types](https://go-llm-router.pardn.io/api-reference-messages.md) - `ParseMode` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md) - `ParseReasoning` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md) - `ParseSSEStream` (core/xai): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `Part` (core/gemini): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `PCMRate` (core): [Audio Types](https://go-llm-router.pardn.io/api-reference-audio.md) - `Prefix` (core/claude, core/cloudflare, core/copilot, core/deepseek, core/gemini, core/grok, core/grokOauth, core/mistral, core/nvidia, core/ollamaCloud, core/openRouter, core/openai, core/openaiCodex): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `ReadImageStream` (core/openai): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `Reasoning` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Getting Started](https://go-llm-router.pardn.io/getting-started.md) - `ReasoningAgent` (core): [Agent Contract](https://go-llm-router.pardn.io/core-concepts.md) - `ReasoningDefault` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md) - `ReasoningHigh` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Reasoning Levels](https://go-llm-router.pardn.io/core-concepts-reasoning.md) - `ReasoningLow` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Reasoning Levels](https://go-llm-router.pardn.io/core-concepts-reasoning.md) - `ReasoningMax` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Reasoning Levels](https://go-llm-router.pardn.io/core-concepts-reasoning.md) - `ReasoningMedium` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Reasoning Levels](https://go-llm-router.pardn.io/core-concepts-reasoning.md) - `ReasoningNone` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Reasoning Levels](https://go-llm-router.pardn.io/core-concepts-reasoning.md) - `ReasoningXHigh` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Reasoning Levels](https://go-llm-router.pardn.io/core-concepts-reasoning.md) - `RequestImage` (core/grok): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md), [Architecture](https://go-llm-router.pardn.io/architecture.md) - `ResponsesAPI` (core, core/xai): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md) - `ResponsesStreamError` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `ScanSSE` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `SessionID` (core): [Helpers](https://go-llm-router.pardn.io/api-reference-helpers.md), [Session Cache Keys](https://go-llm-router.pardn.io/core-concepts-sessions.md) - `SessionUUID` (core): [Helpers](https://go-llm-router.pardn.io/api-reference-helpers.md), [Session Cache Keys](https://go-llm-router.pardn.io/core-concepts-sessions.md) - `StreamAgent` (core): [Agent Contract](https://go-llm-router.pardn.io/core-concepts.md) - `StreamBodyLimit` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md), [Timeouts and Limits](https://go-llm-router.pardn.io/configuration-limits.md) - `StreamChat` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `StreamError` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md), [Architecture](https://go-llm-router.pardn.io/architecture.md) - `StreamEvent` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md), [Streaming](https://go-llm-router.pardn.io/core-concepts-streaming.md) - `StreamEventType` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `StreamResponses` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `STTAgent` (core): [Agent Contract](https://go-llm-router.pardn.io/core-concepts.md) - `SupportFast` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md) - `SupportTemperature` (core): [Helpers](https://go-llm-router.pardn.io/api-reference-helpers.md) - `Tool` (core): [Message Types](https://go-llm-router.pardn.io/api-reference-messages.md), [Tool Calls](https://go-llm-router.pardn.io/core-concepts-tool-calls.md) - `ToolCall` (core, core/copilot/response): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md), [Tool Calls](https://go-llm-router.pardn.io/core-concepts-tool-calls.md) - `ToolCallDelta` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `ToolCallFunction` (core): [Message Types](https://go-llm-router.pardn.io/api-reference-messages.md), [Tool Calls](https://go-llm-router.pardn.io/core-concepts-tool-calls.md) - `ToolFunction` (core): [Message Types](https://go-llm-router.pardn.io/api-reference-messages.md) - `TruncateFrame` (core): [Stream Symbols](https://go-llm-router.pardn.io/api-reference-streaming.md) - `TTSAgent` (core): [Agent Contract](https://go-llm-router.pardn.io/core-concepts.md) - `TTSOptions` (core): [Speech Output](https://go-llm-router.pardn.io/core-concepts-speech.md) - `Usage` (core, core/copilot, core/deepseek, core/grokOauth, core/ollamaCloud, core/openRouter, core/openaiCodex): [Interfaces and Router](https://go-llm-router.pardn.io/api-reference.md), [Usage Normalization](https://go-llm-router.pardn.io/core-concepts-usage.md) - `UsageRemaining` (core): [Balance and Quota](https://go-llm-router.pardn.io/configuration-quota.md) - `VoiceReply` (core/gemini/summary): [Helpers](https://go-llm-router.pardn.io/api-reference-helpers.md) - `WarnFastDowngrade` (core): [Reasoning and Modes](https://go-llm-router.pardn.io/api-reference-reasoning.md), [Fast Mode](https://go-llm-router.pardn.io/core-concepts-fast-mode.md) - `WithSessionID` (core): [Helpers](https://go-llm-router.pardn.io/api-reference-helpers.md), [Session Cache Keys](https://go-llm-router.pardn.io/core-concepts-sessions.md) - `WrapPCM16` (core): [Audio Types](https://go-llm-router.pardn.io/api-reference-audio.md) ## 中文文件 - [首頁](https://go-llm-router.pardn.io/zh/index.md): 以單一 Agent 介面路由 14 家 LLM 供應商對話、圖片與語音請求的 Go 函式庫,由邱敬幃 Pardn Chiu(pardnchiu)開發。 - [快速開始](https://go-llm-router.pardn.io/zh/getting-started.md): 安裝 go-llm-router,用 provider@model 取得 Agent,送出第一個請求並讀取用量。 - [架構](https://go-llm-router.pardn.io/zh/architecture.md): router.New、供應商轉接層、OAuth 權杖存取與共用串流/用量管線如何組合。 - [Agent 契約](https://go-llm-router.pardn.io/zh/core-concepts.md): 所有供應商實作的單一 Agent 介面,以及串流、推理、圖片、STT、TTS 選用能力。 - [模型路由](https://go-llm-router.pardn.io/zh/core-concepts-routing.md): router.New 如何解析 provider@model、把未知前綴改寫為 compat,並以名稱切換供應商。 - [推理等級](https://go-llm-router.pardn.io/zh/core-concepts-reasoning.md): 六個推理等級與別名、各家對映方式,以及超出範圍時的收斂規則。 - [fast 模式](https://go-llm-router.pardn.io/zh/core-concepts-fast-mode.md): ModeFast 對映各家優先層級、以 SupportFast 判斷支援,以及降級警告。 - [工具呼叫](https://go-llm-router.pardn.io/zh/core-concepts-tool-calls.md): 以 OpenAI 形狀與 JSON Schema 宣告工具、回傳工具結果,並原樣回傳 Gemini 簽章。 - [串流](https://go-llm-router.pardn.io/zh/core-concepts-streaming.md): 消費由 Chat Completions 與 Responses SSE 正規化的 SendStream 事件,並處理 StreamError。 - [用量正規化](https://go-llm-router.pardn.io/zh/core-concepts-usage.md): 各家 token 欄位如何折疊成單一 Usage,以及快取 token 如何自 Input 移入 CacheRead。 - [對話快取鍵](https://go-llm-router.pardn.io/zh/core-concepts-sessions.md): WithSessionID 如何轉成 OpenAI、Codex、Grok、Cloudflare 的快取鍵或 session header。 - [圖片生成](https://go-llm-router.pardn.io/zh/core-concepts-images.md): 以 provider@model 選圖片模型、呼叫 GenerateImage,以及 ImageOptions 比例與尺寸的對映。 - [語音輸出](https://go-llm-router.pardn.io/zh/core-concepts-speech.md): 各供應商的預設 TTS voice、支援的輸出格式,以及 OpenRouter 的本地 voice 驗證。 - [模型篩選](https://go-llm-router.pardn.io/zh/core-concepts-model-filters.md): 以 TextOnly、STTOnly、TTSOnly、ImageOnly 列出模型、標記規則與各供應商支援。 - [供應商憑證](https://go-llm-router.pardn.io/zh/configuration.md): router.Config 欄位,以及各供應商前綴需要的 API 金鑰、OAuth 權杖、BaseURL 或 Cloudflare ID。 - [OAuth 權杖](https://go-llm-router.pardn.io/zh/configuration-oauth.md): Copilot、Codex、Grok OAuth 權杖的 keychain 鍵、登入流程、舊鍵相容與自動刷新。 - [自訂端點](https://go-llm-router.pardn.io/zh/configuration-endpoints.md): 把 go-llm-router 指向自架或第三方 OpenAI 相容端點,以及 Cloudflare Workers AI Gateway。 - [逾時與上限](https://go-llm-router.pardn.io/zh/configuration-limits.md): 請求、response header 與模型清單逾時,以及串流與錯誤 body 讀取上限。 - [餘額與配額](https://go-llm-router.pardn.io/zh/configuration-quota.md): 哪些供應商套件回報剩餘點數、餘額或配額百分比,以及各值的意義。 - [介面與工廠](https://go-llm-router.pardn.io/zh/api-reference.md): Agent 與選用介面簽名、router.Config 與 router.New,以及各供應商套件的匯出。 - [訊息型別](https://go-llm-router.pardn.io/zh/api-reference-messages.md): Message、ContentPart、Tool、ToolCall、ToolCallFunction、Output、Usage 的欄位。 - [推理與模式符號](https://go-llm-router.pardn.io/zh/api-reference-reasoning.md): Reasoning 與 Mode 常數,以及 ParseReasoning、ClampReasoning、SupportFast 等函式。 - [模型篩選符號](https://go-llm-router.pardn.io/zh/api-reference-model-filters.md): ModelFilter、ModelInfo、IsTextModel 系列分類函式與 MatchModelFilter 簽名。 - [串流符號](https://go-llm-router.pardn.io/zh/api-reference-streaming.md): StreamEvent、StreamError、ErrStreamUnsupported、OpenStream 等 SSE 輔助函式與上限常數。 - [圖片型別](https://go-llm-router.pardn.io/zh/api-reference-images.md): ImageOptions 與 ImageResult、各供應商圖片端點與格式、ImagePixelSize 與 DataURI。 - [語音型別](https://go-llm-router.pardn.io/zh/api-reference-audio.md): STT 與 TTS 選項與結果型別、各供應商語音端點,以及 PCMRate 與 WrapPCM16。 - [OAuth 函式](https://go-llm-router.pardn.io/zh/api-reference-oauth.md): Copilot、Codex、Grok OAuth 套件的 Load、HasToken、LoginWithCallback、EnsureFresh。 - [輔助函式](https://go-llm-router.pardn.io/zh/api-reference-helpers.md): NewHTTPClient、SupportTemperature、ResponsesAPI、summary.VoiceReply 與 session 輔助函式。 - [已移除 API](https://go-llm-router.pardn.io/zh/api-reference-removed.md): v0.2.0 起移除的 go-llm-router 匯出符號、移除版本與替代做法。 ## Optional - [Release Notes](https://go-llm-router.pardn.io/released/index.md): pardnchiu/go-llm-router changelog by version