Documentation
¶
Overview ¶
Package models provides model classification utilities shared across the client and provider packages. It consolidates endpoint type detection and model-specific classification logic to avoid duplication.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAnthropicModel ¶
IsAnthropicModel returns true if the Go provider model requires the Anthropic endpoint. Most Go provider models use the Chat Completions transform path for broader compatibility (tool format, message roles, etc.). Exceptions are models whose upstream backends don't support the OpenAI Chat Completions format and only accept Anthropic Messages format.
Only Zen models use the raw Anthropic endpoint via ClassifyEndpoint.
func IsGeminiModel ¶
IsGeminiModel returns true for models using the Gemini endpoint.
func IsResponsesModel ¶
IsResponsesModel returns true for models using the OpenAI Responses endpoint.
func IsZenAnthropicModel ¶
IsZenAnthropicModel returns true for models on Zen that use the Anthropic endpoint.
Types ¶
type EndpointType ¶
type EndpointType int
EndpointType determines which API endpoint format to use for a model.
const ( // EndpointChatCompletions is the OpenAI-compatible /v1/chat/completions endpoint. EndpointChatCompletions EndpointType = iota // EndpointAnthropic is the Anthropic /v1/messages endpoint. EndpointAnthropic // EndpointResponses is the OpenAI native /v1/responses endpoint. EndpointResponses // EndpointGemini is the Google Gemini /v1/models/{id} endpoint. EndpointGemini )
func ClassifyEndpoint ¶
func ClassifyEndpoint(modelID string) EndpointType
ClassifyEndpoint determines the endpoint type for a model on Zen. This is Zen-specific: minimax models use chat completions on Zen (they use Anthropic only on the Go provider).