Documentation
¶
Index ¶
- type Architecture
- type Endpoint
- type Info
- func (i Info) CompletionPriceUSD() (float64, bool)
- func (i Info) CostTier() string
- func (i Info) ImagePriceUSD() (float64, bool)
- func (i Info) MaxCompletionTokens() int
- func (i Info) MaxContextLength() int
- func (i Info) PromptPriceUSD() (float64, bool)
- func (i Info) RequestPriceUSD() (float64, bool)
- func (i Info) SupportsImageInput() bool
- func (i Info) SupportsImageOutput() bool
- func (i Info) SupportsPromptCaching() bool
- func (i Info) SupportsReasoning() bool
- func (i Info) SupportsStructuredOutput() bool
- func (i Info) SupportsToolCalling() bool
- func (i Info) SupportsWebSearch() bool
- func (i Info) ToModel() Model
- type ListResponse
- type Model
- type PerRequestLimits
- type Pricing
- type SupportedParameters
- type TopProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Architecture ¶
type Architecture struct {
Modality string `json:"modality,omitempty"`
Tokenizer string `json:"tokenizer,omitempty"`
InstructType string `json:"instruct_type,omitempty"`
}
Architecture describes the underlying model family where available.
type Endpoint ¶
type Endpoint struct {
Name string `json:"name,omitempty"`
ContextLength int `json:"context_length,omitempty"`
MaxCompletionTokens int `json:"max_completion_tokens,omitempty"`
}
Endpoint identifies an endpoint a model supports.
type Info ¶
type Info struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
CanonicalSlug string `json:"canonical_slug,omitempty"`
Description string `json:"description,omitempty"`
ContextLength int `json:"context_length,omitempty"`
Architecture *Architecture `json:"architecture,omitempty"`
Pricing *Pricing `json:"pricing,omitempty"`
TopProvider *TopProvider `json:"top_provider,omitempty"`
PerRequestLimits *PerRequestLimits `json:"per_request_limits,omitempty"`
SupportedParameters SupportedParameters `json:"supported_parameters,omitempty"`
Endpoints []Endpoint `json:"endpoints,omitempty"`
DefaultEndpoint string `json:"default_endpoint,omitempty"`
IsModerated bool `json:"is_moderated,omitempty"`
IsReasoning bool `json:"is_reasoning,omitempty"`
IsFree bool `json:"is_free,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Info describes a model returned by VLLM model discovery.
func (Info) CompletionPriceUSD ¶
CompletionPriceUSD returns the parsed completion price when present.
func (Info) ImagePriceUSD ¶
ImagePriceUSD returns the parsed image price when present.
func (Info) MaxCompletionTokens ¶
MaxCompletionTokens returns the best available completion-token ceiling across model metadata.
func (Info) MaxContextLength ¶
MaxContextLength returns the best available context-length value across model metadata.
func (Info) PromptPriceUSD ¶
PromptPriceUSD returns the parsed prompt price when present.
func (Info) RequestPriceUSD ¶
RequestPriceUSD returns the parsed per-request price when present.
func (Info) SupportsImageInput ¶
SupportsImageInput reports whether the model appears to accept image or multimodal input.
func (Info) SupportsImageOutput ¶
SupportsImageOutput reports whether the model appears to support generated image output.
func (Info) SupportsPromptCaching ¶
SupportsPromptCaching reports whether cache read/write pricing is exposed.
func (Info) SupportsReasoning ¶
SupportsReasoning reports whether the model exposes explicit reasoning support.
func (Info) SupportsStructuredOutput ¶
SupportsStructuredOutput reports whether JSON-schema style output controls are exposed.
func (Info) SupportsToolCalling ¶
SupportsToolCalling reports whether the model exposes tool-related parameters.
func (Info) SupportsWebSearch ¶
SupportsWebSearch reports whether the model metadata exposes web-search controls.
type ListResponse ¶
type ListResponse struct {
Object string `json:"object,omitempty"`
Source string `json:"source,omitempty"`
Models []Info `json:"models"`
RawData []Info `json:"data,omitempty"`
Total int `json:"total"`
Authenticated bool `json:"authenticated"`
Endpoint string `json:"endpoint"`
}
ListResponse contains the full model discovery payload.
type Model ¶
type Model struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Context int `json:"context,omitempty"`
IsFree bool `json:"is_free,omitempty"`
IsReasoning bool `json:"is_reasoning,omitempty"`
}
Model is a stable provider-neutral wrapper for a discovered model.
type PerRequestLimits ¶
type PerRequestLimits struct {
PromptTokens int `json:"prompt_tokens,omitempty"`
CompletionTokens int `json:"completion_tokens,omitempty"`
Images int `json:"images,omitempty"`
}
PerRequestLimits captures model-side request limits where available.
type Pricing ¶
type Pricing struct {
Prompt string `json:"prompt,omitempty"`
Completion string `json:"completion,omitempty"`
Request string `json:"request,omitempty"`
Image string `json:"image,omitempty"`
InputCacheRead string `json:"input_cache_read,omitempty"`
InputCacheWrite string `json:"input_cache_write,omitempty"`
WebSearch string `json:"web_search,omitempty"`
InternalReasoning string `json:"internal_reasoning,omitempty"`
}
Pricing contains VLLM pricing fields as returned by the API.
type SupportedParameters ¶
type SupportedParameters []string
SupportedParameters records provider-supported request parameters.
type TopProvider ¶
type TopProvider struct {
ContextLength int `json:"context_length,omitempty"`
MaxCompletionTokens int `json:"max_completion_tokens,omitempty"`
IsModerated bool `json:"is_moderated,omitempty"`
}
TopProvider describes provider-side limits and moderation behavior.