Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProviderAnthropic spec.ProviderName = "anthropic" ProviderGoogleGemini spec.ProviderName = "googlegemini" ProviderHuggingFace spec.ProviderName = "huggingface" ProviderLlamaCPP spec.ProviderName = "llamacpp" ProviderMistral spec.ProviderName = "mistral" ProviderOpenAIChat spec.ProviderName = "openai" ProviderOpenAIResponses spec.ProviderName = "openairesponses" ProviderOpenRouter spec.ProviderName = "openrouter" ProviderXAI spec.ProviderName = "xai" )
View Source
const ( ModelNameAnthropicFable5 spec.ModelName = "claude-fable-5" ModelNameAnthropicOpus48 spec.ModelName = "claude-opus-4-8" ModelNameAnthropicOpus47 spec.ModelName = "claude-opus-4-7" ModelNameAnthropicOpus46 spec.ModelName = "claude-opus-4-6" ModelNameAnthropicOpus45 spec.ModelName = "claude-opus-4-5-20251101" ModelNameAnthropicOpus41 spec.ModelName = "claude-opus-4-1-20250805" ModelNameAnthropicSonnet5 spec.ModelName = "claude-sonnet-5" ModelNameAnthropicSonnet46 spec.ModelName = "claude-sonnet-4-6" ModelNameAnthropicSonnet45 spec.ModelName = "claude-sonnet-4-5-20250929" ModelNameAnthropicSonnet4 spec.ModelName = "claude-sonnet-4-20250514" ModelNameAnthropicHaiku45 spec.ModelName = "claude-haiku-4-5-20251001" )
View Source
const ( ModelNameGoogleGemini31Pro spec.ModelName = "gemini-3.1-pro-preview" ModelNameGoogleGemini35Flash spec.ModelName = "gemini-3.5-flash" ModelNameGoogleGemini3Flash spec.ModelName = "gemini-3-flash-preview" ModelNameGoogleGemini31FlashLite spec.ModelName = "gemini-3.1-flash-lite-preview" ModelNameGoogleGemini25Flash spec.ModelName = "gemini-2.5-flash" ModelNameGoogleGemini25FlashLite spec.ModelName = "gemini-2.5-flash-lite-preview-06-17" )
View Source
const ( ModelNameHuggingFaceGPTOSS120 spec.ModelName = "openai/gpt-oss-120b:fireworks-ai" ModelNameHuggingFaceGPTOSS20 spec.ModelName = "openai/gpt-oss-20b:fireworks-ai" ModelNameHuggingFaceQwen3Coder30 spec.ModelName = "Qwen/Qwen3-Coder-30B-A3B-Instruct:fireworks-ai" ModelNameHuggingFaceGLM52 spec.ModelName = "zai-org/GLM-5.2:fireworks-ai" ModelNameHuggingFaceDeepSeekV4Flash spec.ModelName = "deepseek-ai/DeepSeek-V4-Flash:fireworks-ai" ModelNameHuggingFaceDeepSeekV4Pro spec.ModelName = "deepseek-ai/DeepSeek-V4-Pro:fireworks-ai" ModelNameHuggingFaceOrnith1035BFP8 spec.ModelName = "deepreinforce-ai/Ornith-1.0-35B-FP8:deepinfra" ModelNameHuggingFaceGLM52FP8 spec.ModelName = "zai-org/GLM-5.2-FP8:zai-org" ModelNameHuggingFaceMiMoV25Pro spec.ModelName = "XiaomiMiMo/MiMo-V2.5-Pro:deepinfra" ModelNameHuggingFaceNemotron3UltraNVFP4 spec.ModelName = "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-NVFP4:fireworks-ai" ModelNameHuggingFaceQwen3CoderNext spec.ModelName = "Qwen/Qwen3-Coder-Next:novita" ModelNameHuggingFaceNemotron3UltraBF16 spec.ModelName = "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16:deepinfra" ModelNameHuggingFaceGLM51 spec.ModelName = "zai-org/GLM-5.1:fireworks-ai" ModelNameHuggingFaceNemotron3SuperBF16 spec.ModelName = "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16:featherless-ai" ModelNameHuggingFaceMiniMaxM27 spec.ModelName = "MiniMaxAI/MiniMax-M2.7:fireworks-ai" ModelNameHuggingFaceKimiK2Thinking spec.ModelName = "moonshotai/Kimi-K2-Thinking:featherless-ai" ModelNameHuggingFaceGLM5 spec.ModelName = "zai-org/GLM-5:novita" ModelNameHuggingFaceStep35Flash spec.ModelName = "stepfun-ai/Step-3.5-Flash:featherless-ai" ModelNameHuggingFaceMiniMaxM25 spec.ModelName = "MiniMaxAI/MiniMax-M2.5:novita" ModelNameHuggingFaceKimiK2Instruct spec.ModelName = "moonshotai/Kimi-K2-Instruct:novita" ModelNameHuggingFaceKimiK2Instruct0905 spec.ModelName = "moonshotai/Kimi-K2-Instruct-0905:novita" ModelNameHuggingFaceMiMoV2Flash spec.ModelName = "XiaomiMiMo/MiMo-V2-Flash:featherless-ai" ModelNameHuggingFaceGLM47 spec.ModelName = "zai-org/GLM-4.7:cerebras" ModelNameHuggingFaceGLM51FP8 spec.ModelName = "zai-org/GLM-5.1-FP8:fireworks-ai" )
View Source
const ( ModelNameLlamaCPPBehemoth spec.ModelName = "llama4-behemoth" ModelNameLlamaCPPMaverick spec.ModelName = "llama4-maverick" ModelNameLlamaCPPScout spec.ModelName = "llama4-scout" )
View Source
const ( ModelNameMistralMedium35 spec.ModelName = "mistral-medium-3-5" ModelNameMistralSmall4 spec.ModelName = "mistral-small-2603" ModelNameMistralLarge3 spec.ModelName = "mistral-large-2512" ModelNameMistralDevstral2 spec.ModelName = "devstral-2512" )
View Source
const ( ModelNameOpenAIChatGPT41 spec.ModelName = "gpt-4.1" ModelNameOpenAIChatGPT41Mini spec.ModelName = "gpt-4.1-mini" ModelNameOpenAIChatGPT4o spec.ModelName = "gpt-4o" ModelNameOpenAIChatGPT4oMini spec.ModelName = "gpt-4o-mini" )
View Source
const ( ModelNameOpenAIResponsesGPT55 spec.ModelName = "gpt-5.5" ModelNameOpenAIResponsesGPT54 spec.ModelName = "gpt-5.4" ModelNameOpenAIResponsesGPT54Mini spec.ModelName = "gpt-5.4-mini" ModelNameOpenAIResponsesGPT54Nano spec.ModelName = "gpt-5.4-nano" ModelNameOpenAIResponsesGPT53Codex spec.ModelName = "gpt-5.3-codex" ModelNameOpenAIResponsesGPT52 spec.ModelName = "gpt-5.2" ModelNameOpenAIResponsesGPT52Codex spec.ModelName = "gpt-5.2-codex" ModelNameOpenAIResponsesGPT51 spec.ModelName = "gpt-5.1" ModelNameOpenAIResponsesGPT51Codex spec.ModelName = "gpt-5.1-codex" ModelNameOpenAIResponsesGPT51CodexMax spec.ModelName = "gpt-5.1-codex-max" ModelNameOpenAIResponsesGPT5Mini spec.ModelName = "gpt-5-mini" )
View Source
const ( ModelNameOpenRouterDeepSeekV4Flash spec.ModelName = "deepseek/deepseek-v4-flash" ModelNameOpenRouterXiaomiMiMoV25 spec.ModelName = "xiaomi/mimo-v2.5" ModelNameOpenRouterTencentHy3Preview spec.ModelName = "tencent/hy3-preview" ModelNameOpenRouterMiniMaxM3 spec.ModelName = "minimax/minimax-m3" ModelNameOpenRouterZAIGLM52 spec.ModelName = "z-ai/glm-5.2" ModelNameOpenRouterDeepSeekV4Pro spec.ModelName = "deepseek/deepseek-v4-pro" ModelNameOpenRouterStepFunStep37Flash spec.ModelName = "stepfun/step-3.7-flash" ModelNameOpenRouterNVIDIANemotron3UltraFree spec.ModelName = "nvidia/nemotron-3-ultra-550b-a55b:free" ModelNameOpenRouterPoolsideLagunaM1Free spec.ModelName = "poolside/laguna-m.1:free" ModelNameOpenRouterXiaomiMiMoV25Pro spec.ModelName = "xiaomi/mimo-v2.5-pro" ModelNameOpenRouterNVIDIANemotron3SuperFree spec.ModelName = "nvidia/nemotron-3-super-120b-a12b:free" ModelNameOpenRouterMoonshotKimiK26 spec.ModelName = "moonshotai/kimi-k2.6" ModelNameOpenRouterQwen37Max spec.ModelName = "qwen/qwen3.7-max" ModelNameOpenRouterZAIGLM51 spec.ModelName = "z-ai/glm-5.1" ModelNameOpenRouterMoonshotKimiK27Code spec.ModelName = "moonshotai/kimi-k2.7-code" ModelNameOpenRouterQwen37Plus spec.ModelName = "qwen/qwen3.7-plus" ModelNameOpenRouterMiniMaxM27 spec.ModelName = "minimax/minimax-m2.7" ModelNameOpenRouterMiniMaxM25Free spec.ModelName = "minimax/minimax-m2.5:free" )
Variables ¶
View Source
var ( ErrProviderNotFound = errors.New("provider preset not found") ErrModelNotFound = errors.New("model preset not found") )
Functions ¶
func ProviderNames ¶
func ProviderNames() []spec.ProviderName
Types ¶
type Catalog ¶
type Catalog struct {
Providers map[spec.ProviderName]ProviderPreset `json:"providers"`
}
func CloneCatalog ¶
func DefaultCatalog ¶
func DefaultCatalog() Catalog
type ModelPreset ¶
type ModelPreset struct {
ID ModelPresetID `json:"id"`
Name spec.ModelName `json:"name"`
DisplayName string `json:"displayName"`
// ModelParam is the default runtime request model configuration.
// Callers should treat values returned by this package as immutable.
ModelParam spec.ModelParam `json:"modelParam"`
// CapabilitiesOverride is a runtime capability patch applied over provider/base SDK capabilities.
// It is not the derived/effective capability profile.
CapabilitiesOverride *capabilityoverride.ModelCapabilitiesOverride `json:"capabilitiesOverride,omitempty"`
}
func CloneModelPreset ¶
func CloneModelPreset(in ModelPreset) ModelPreset
func Model ¶
func Model(provider spec.ProviderName, modelPresetID ModelPresetID) (ModelPreset, error)
type ModelPresetID ¶
type ModelPresetID string
const ( PresetAnthropicFable5 ModelPresetID = "fable5" PresetAnthropicOpus48 ModelPresetID = "opus48" PresetAnthropicOpus47 ModelPresetID = "opus47" PresetAnthropicOpus46 ModelPresetID = "opus46" PresetAnthropicOpus45 ModelPresetID = "opus45" PresetAnthropicOpus41 ModelPresetID = "opus41" PresetAnthropicSonnet5 ModelPresetID = "sonnet5" PresetAnthropicSonnet46 ModelPresetID = "sonnet46" PresetAnthropicSonnet45 ModelPresetID = "sonnet45" PresetAnthropicSonnet4 ModelPresetID = "sonnet4" PresetAnthropicHaiku45 ModelPresetID = "haiku45" )
const ( PresetGoogleGemini35Flash ModelPresetID = "gemini35Flash" PresetGoogleGemini31Pro ModelPresetID = "gemini31Pro" PresetGoogleGemini3Flash ModelPresetID = "gemini3Flash" PresetGoogleGemini31FlashLite ModelPresetID = "gemini31FlashLite" PresetGoogleGemini25Flash ModelPresetID = "gemini25Flash" PresetGoogleGemini25FlashLite ModelPresetID = "gemini25FlashLite" )
const ( PresetHuggingFaceGPTOSS120 ModelPresetID = "hfGptOss120" PresetHuggingFaceGPTOSS20 ModelPresetID = "hfGptOss20" PresetHuggingFaceQwen3Coder30 ModelPresetID = "hfQwen3Coder30" PresetHuggingFaceGLM52 ModelPresetID = "hfGlm52" PresetHuggingFaceDeepSeekV4Flash ModelPresetID = "hfDeepSeekV4Flash" PresetHuggingFaceDeepSeekV4Pro ModelPresetID = "hfDeepSeekV4Pro" PresetHuggingFaceOrnith1035BFP8 ModelPresetID = "hfOrnith1035BFP8" PresetHuggingFaceGLM52FP8 ModelPresetID = "hfGlm52FP8" PresetHuggingFaceMiMoV25Pro ModelPresetID = "hfMiMoV25Pro" PresetHuggingFaceNemotron3UltraNVFP4 ModelPresetID = "hfNemotron3UltraNVFP4" PresetHuggingFaceQwen3CoderNext ModelPresetID = "hfQwen3CoderNext" PresetHuggingFaceNemotron3UltraBF16 ModelPresetID = "hfNemotron3UltraBF16" PresetHuggingFaceGLM51 ModelPresetID = "hfGlm51" PresetHuggingFaceNemotron3SuperBF16 ModelPresetID = "hfNemotron3SuperBF16" PresetHuggingFaceMiniMaxM27 ModelPresetID = "hfMiniMaxM27" PresetHuggingFaceKimiK2Thinking ModelPresetID = "hfKimiK2Thinking" PresetHuggingFaceGLM5 ModelPresetID = "hfGlm5" PresetHuggingFaceStep35Flash ModelPresetID = "hfStep35Flash" PresetHuggingFaceMiniMaxM25 ModelPresetID = "hfMiniMaxM25" PresetHuggingFaceKimiK2Instruct ModelPresetID = "hfKimiK2Instruct" PresetHuggingFaceKimiK2Instruct0905 ModelPresetID = "hfKimiK2Instruct0905" PresetHuggingFaceMiMoV2Flash ModelPresetID = "hfMiMoV2Flash" PresetHuggingFaceGLM47 ModelPresetID = "hfGlm47" PresetHuggingFaceGLM51FP8 ModelPresetID = "hfGlm51FP8" )
const ( PresetLlamaCPPBehemoth ModelPresetID = "llama4Behemoth" PresetLlamaCPPMaverick ModelPresetID = "llama4Maverick" PresetLlamaCPPScout ModelPresetID = "llama4Scout" )
const ( PresetMistralMedium35 ModelPresetID = "mistralMedium35" PresetMistralSmall4 ModelPresetID = "mistralSmall4" PresetMistralLarge3 ModelPresetID = "mistralLarge3" PresetMistralDevstral2 ModelPresetID = "devstral2" )
const ( PresetOpenAIChatGPT41 ModelPresetID = "gpt41" PresetOpenAIChatGPT41Mini ModelPresetID = "gpt41Mini" PresetOpenAIChatGPT4o ModelPresetID = "gpt4o" PresetOpenAIChatGPT4oMini ModelPresetID = "gpt4oMini" )
const ( PresetOpenAIResponsesGPT55 ModelPresetID = "gpt55" PresetOpenAIResponsesGPT54 ModelPresetID = "gpt54" PresetOpenAIResponsesGPT54Mini ModelPresetID = "gpt54mini" PresetOpenAIResponsesGPT54Nano ModelPresetID = "gpt54nano" PresetOpenAIResponsesGPT53Codex ModelPresetID = "gpt53Codex" PresetOpenAIResponsesGPT52 ModelPresetID = "gpt52" PresetOpenAIResponsesGPT52Codex ModelPresetID = "gpt52Codex" PresetOpenAIResponsesGPT51 ModelPresetID = "gpt51" PresetOpenAIResponsesGPT51Codex ModelPresetID = "gpt51Codex" PresetOpenAIResponsesGPT51CodexMax ModelPresetID = "gpt51CodexMax" PresetOpenAIResponsesGPT5Mini ModelPresetID = "gpt5Mini" )
const ( PresetOpenRouterDeepSeekV4Flash ModelPresetID = "deepseekV4Flash" PresetOpenRouterXiaomiMiMoV25 ModelPresetID = "xiaomiMiMoV25" PresetOpenRouterTencentHy3Preview ModelPresetID = "tencentHy3Preview" PresetOpenRouterMiniMaxM3 ModelPresetID = "minimaxM3" PresetOpenRouterZAIGLM52 ModelPresetID = "zaiglm52" PresetOpenRouterDeepSeekV4Pro ModelPresetID = "deepseekV4Pro" PresetOpenRouterStepFunStep37Flash ModelPresetID = "stepfunStep37Flash" PresetOpenRouterNVIDIANemotron3UltraFree ModelPresetID = "nvidiaNemotron3UltraFree" PresetOpenRouterPoolsideLagunaM1Free ModelPresetID = "poolsideLagunaM1Free" PresetOpenRouterXiaomiMiMoV25Pro ModelPresetID = "xiaomiMiMoV25Pro" PresetOpenRouterNVIDIANemotron3SuperFree ModelPresetID = "nvidiaNemotron3SuperFree" PresetOpenRouterMoonshotKimiK26 ModelPresetID = "moonshotKimiK26" PresetOpenRouterQwen37Max ModelPresetID = "qwen37Max" PresetOpenRouterZAIGLM51 ModelPresetID = "zaiglm51" PresetOpenRouterMoonshotKimiK27Code ModelPresetID = "moonshotKimiK27Code" PresetOpenRouterQwen37Plus ModelPresetID = "qwen37Plus" PresetOpenRouterMiniMaxM27 ModelPresetID = "minimaxm27" PresetOpenRouterMiniMaxM25Free ModelPresetID = "minimaxm25free" )
const ( PresetXAIGrokBuild01 ModelPresetID = "grokBuild01" PresetXAIGrok43 ModelPresetID = "grok43" PresetXAIGrok42Reasoning ModelPresetID = "grok42Reasoning" PresetXAIGrok42NonReasoning ModelPresetID = "grok42NonReasoning" )
func ModelPresetIDs ¶
func ModelPresetIDs(provider spec.ProviderName) ([]ModelPresetID, error)
type ProviderPreset ¶
type ProviderPreset struct {
Name spec.ProviderName `json:"name"`
DisplayName string `json:"displayName"`
SDKType spec.ProviderSDKType `json:"sdkType"`
Origin string `json:"origin"`
ChatCompletionPathPrefix string `json:"chatCompletionPathPrefix"`
APIKeyHeaderKey string `json:"apiKeyHeaderKey"`
DefaultHeaders map[string]string `json:"defaultHeaders,omitempty"`
// CapabilitiesOverride is a provider-wide runtime capability patch.
// Model preset overrides are applied after this.
CapabilitiesOverride *capabilityoverride.ModelCapabilitiesOverride `json:"capabilitiesOverride,omitempty"`
ModelPresets map[ModelPresetID]ModelPreset `json:"modelPresets"`
}
func CloneProviderPreset ¶
func CloneProviderPreset(in ProviderPreset) ProviderPreset
func Provider ¶
func Provider(name spec.ProviderName) (ProviderPreset, error)
Click to show internal directories.
Click to hide internal directories.