Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenRouterSupportedParameters ¶
OpenRouterSupportedParameters returns a list of parameters that this model supports. This matches the OpenRouter API format for supported_parameters.
Types ¶
type OpenAIModel ¶
type OpenAIModel struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
OwnedBy string `json:"owned_by"`
}
OpenAIModel represents a model in OpenAI API format. Field order matches the OpenAI API response schema.
func ToOpenAIModel ¶
func ToOpenAIModel(m *catalogs.Model) OpenAIModel
ToOpenAIModel converts a Model to OpenAI format.
type OpenAIModelsResponse ¶
type OpenAIModelsResponse struct {
Object string `json:"object"`
Data []OpenAIModel `json:"data"`
}
OpenAIModelsResponse represents the root response object for OpenAI models list API.
type OpenRouterArchitecture ¶
type OpenRouterArchitecture struct {
InputModalities []string `json:"input_modalities"`
OutputModalities []string `json:"output_modalities"`
Tokenizer string `json:"tokenizer"`
InstructType *string `json:"instruct_type"`
}
OpenRouterArchitecture represents the architecture object in OpenRouter format.
type OpenRouterModel ¶
type OpenRouterModel struct {
ID string `json:"id"`
Name string `json:"name"`
Created int64 `json:"created"`
Description string `json:"description"`
Architecture OpenRouterArchitecture `json:"architecture"`
TopProvider OpenRouterTopProvider `json:"top_provider"`
Pricing OpenRouterPricing `json:"pricing"`
CanonicalSlug string `json:"canonical_slug"`
ContextLength int64 `json:"context_length"`
HuggingFaceID string `json:"hugging_face_id,omitempty"`
PerRequestLimits any `json:"per_request_limits"`
SupportedParameters []string `json:"supported_parameters"`
}
OpenRouterModel represents a model in OpenRouter API format. Field order matches the OpenRouter API response schema.
func ToOpenRouterModel ¶
func ToOpenRouterModel(m *catalogs.Model) OpenRouterModel
ToOpenRouterModel converts a Model to OpenRouter format.
type OpenRouterModelsResponse ¶
type OpenRouterModelsResponse struct {
Data []OpenRouterModel `json:"data"`
}
OpenRouterModelsResponse represents the root response object for OpenRouter models API.
type OpenRouterPricing ¶
type OpenRouterPricing struct {
Prompt string `json:"prompt"`
Completion string `json:"completion"`
Request string `json:"request"`
Image string `json:"image"`
WebSearch string `json:"web_search"`
InternalReasoning string `json:"internal_reasoning"`
InputCacheRead string `json:"input_cache_read"`
InputCacheWrite string `json:"input_cache_write"`
}
OpenRouterPricing represents the pricing object in OpenRouter format.
type OpenRouterTopProvider ¶
type OpenRouterTopProvider struct {
ContextLength int64 `json:"context_length"`
MaxCompletionTokens int64 `json:"max_completion_tokens"`
IsModerated bool `json:"is_moderated"`
}
OpenRouterTopProvider represents the top provider object in OpenRouter format.