diff --git a/cmd/root.go b/cmd/root.go index ffe5ef6b..65c2ae57 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -18,6 +18,7 @@ import ( "github.com/mark3labs/mcphost/internal/models" "github.com/mark3labs/mcphost/internal/session" "github.com/mark3labs/mcphost/internal/tokens" + "github.com/mark3labs/mcphost/internal/tools" "github.com/mark3labs/mcphost/internal/ui" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -386,8 +387,15 @@ func runNormalMode(ctx context.Context) error { } // Create the agent using the factory - mcpAgent, err := agent.CreateAgent(ctx, &agent.AgentCreationOptions{ - ModelConfig: modelConfig, + // Use a buffered debug logger to capture messages during initialization + var bufferedLogger *tools.BufferedDebugLogger + var debugLogger tools.DebugLogger + if viper.GetBool("debug") { + bufferedLogger = tools.NewBufferedDebugLogger(true) + debugLogger = bufferedLogger + } + + mcpAgent, err := agent.CreateAgent(ctx, &agent.AgentCreationOptions{ModelConfig: modelConfig, MCPConfig: mcpConfig, SystemPrompt: systemPrompt, MaxSteps: viper.GetInt("max-steps"), @@ -395,6 +403,7 @@ func runNormalMode(ctx context.Context) error { ShowSpinner: true, Quiet: quietFlag, SpinnerFunc: spinnerFunc, + DebugLogger: debugLogger, }) if err != nil { return fmt.Errorf("failed to create agent: %v", err) @@ -441,6 +450,16 @@ func runNormalMode(ctx context.Context) error { return fmt.Errorf("failed to setup CLI: %v", err) } + // Display buffered debug messages if any + if bufferedLogger != nil && cli != nil { + messages := bufferedLogger.GetMessages() + if len(messages) > 0 { + // Combine all messages into a single debug output + combinedMessage := strings.Join(messages, "\n ") + cli.DisplayDebugMessage(combinedMessage) + } + } + // Display debug configuration if debug mode is enabled if !quietFlag && cli != nil && viper.GetBool("debug") { debugConfig := map[string]any{ diff --git a/cmd/script.go b/cmd/script.go index 2abf0563..2b3a7b20 100644 --- a/cmd/script.go +++ b/cmd/script.go @@ -15,6 +15,7 @@ import ( "github.com/mark3labs/mcphost/internal/config" "github.com/mark3labs/mcphost/internal/hooks" "github.com/mark3labs/mcphost/internal/models" + "github.com/mark3labs/mcphost/internal/tools" "github.com/mark3labs/mcphost/internal/ui" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -596,6 +597,12 @@ func runScriptMode(ctx context.Context, mcpConfig *config.Config, prompt string, } // Create the agent using the factory (scripts don't need spinners) + // Use a simple debug logger for scripts + var debugLogger tools.DebugLogger + if finalDebug { + debugLogger = tools.NewSimpleDebugLogger(true) + } + mcpAgent, err := agent.CreateAgent(ctx, &agent.AgentCreationOptions{ ModelConfig: modelConfig, MCPConfig: mcpConfig, @@ -605,6 +612,7 @@ func runScriptMode(ctx context.Context, mcpConfig *config.Config, prompt string, ShowSpinner: false, // Scripts don't need spinners Quiet: quietFlag, SpinnerFunc: nil, // No spinner function needed + DebugLogger: debugLogger, }) if err != nil { return fmt.Errorf("failed to create agent: %v", err) diff --git a/internal/agent/agent.go b/internal/agent/agent.go index f70ed1bf..e0d76726 100644 --- a/internal/agent/agent.go +++ b/internal/agent/agent.go @@ -23,6 +23,7 @@ type AgentConfig struct { SystemPrompt string MaxSteps int StreamingEnabled bool + DebugLogger tools.DebugLogger // Optional debug logger } // ToolCallHandler is a function type for handling tool calls as they happen @@ -68,6 +69,11 @@ func NewAgent(ctx context.Context, config *AgentConfig) (*Agent, error) { // Set the model for sampling support toolManager.SetModel(providerResult.Model) + // Set the debug logger if provided + if config.DebugLogger != nil { + toolManager.SetDebugLogger(config.DebugLogger) + } + if err := toolManager.LoadTools(ctx, config.MCPConfig); err != nil { return nil, fmt.Errorf("failed to load MCP tools: %v", err) } diff --git a/internal/agent/factory.go b/internal/agent/factory.go index e3f379d2..42cc4226 100644 --- a/internal/agent/factory.go +++ b/internal/agent/factory.go @@ -7,6 +7,7 @@ import ( "github.com/mark3labs/mcphost/internal/config" "github.com/mark3labs/mcphost/internal/models" + "github.com/mark3labs/mcphost/internal/tools" ) // SpinnerFunc is a function type for showing spinners during agent creation @@ -19,9 +20,10 @@ type AgentCreationOptions struct { SystemPrompt string MaxSteps int StreamingEnabled bool - ShowSpinner bool // For Ollama models - Quiet bool // Skip spinner if quiet - SpinnerFunc SpinnerFunc // Function to show spinner (provided by caller) + ShowSpinner bool // For Ollama models + Quiet bool // Skip spinner if quiet + SpinnerFunc SpinnerFunc // Function to show spinner (provided by caller) + DebugLogger tools.DebugLogger // Optional debug logger } // CreateAgent creates an agent with optional spinner for Ollama models @@ -32,6 +34,7 @@ func CreateAgent(ctx context.Context, opts *AgentCreationOptions) (*Agent, error SystemPrompt: opts.SystemPrompt, MaxSteps: opts.MaxSteps, StreamingEnabled: opts.StreamingEnabled, + DebugLogger: opts.DebugLogger, } var agent *Agent diff --git a/internal/models/models_data.go b/internal/models/models_data.go index ebf9c122..8c5d6ff4 100644 --- a/internal/models/models_data.go +++ b/internal/models/models_data.go @@ -42,7 +42,7 @@ func GetModelsData() map[string]ProviderInfo { return map[string]ProviderInfo{ "alibaba": { ID: "alibaba", - Env: []string{"DASHSCOPE_API_KEY" }, + Env: []string{"DASHSCOPE_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Alibaba", Models: map[string]ModelInfo{ @@ -53,9 +53,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1, - Output: 5, - CacheRead: nil, + Input: 1, + Output: 5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -67,7 +67,7 @@ func GetModelsData() map[string]ProviderInfo { }, "amazon-bedrock": { ID: "amazon-bedrock", - Env: []string{"AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_REGION" }, + Env: []string{"AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_REGION"}, NPM: "@ai-sdk/amazon-bedrock", Name: "Amazon Bedrock", Models: map[string]ModelInfo{ @@ -78,9 +78,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: nil, + Input: 2, + Output: 8, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -95,9 +95,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 0.4, - CacheRead: nil, + Input: 0.2, + Output: 0.4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -112,9 +112,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.06, - Output: 0.24, - CacheRead: &[]float64{0.015}[0], + Input: 0.06, + Output: 0.24, + CacheRead: &[]float64{0.015}[0], CacheWrite: nil, }, Limit: Limit{ @@ -129,9 +129,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.035, - Output: 0.14, - CacheRead: &[]float64{0.00875}[0], + Input: 0.035, + Output: 0.14, + CacheRead: &[]float64{0.00875}[0], CacheWrite: nil, }, Limit: Limit{ @@ -146,9 +146,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 2.5, - Output: 12.5, - CacheRead: nil, + Input: 2.5, + Output: 12.5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -163,9 +163,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.8, - Output: 3.2, - CacheRead: &[]float64{0.2}[0], + Input: 0.8, + Output: 3.2, + CacheRead: &[]float64{0.2}[0], CacheWrite: nil, }, Limit: Limit{ @@ -180,9 +180,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.8, - Output: 4, - CacheRead: &[]float64{0.08}[0], + Input: 0.8, + Output: 4, + CacheRead: &[]float64{0.08}[0], CacheWrite: &[]float64{1}[0], }, Limit: Limit{ @@ -197,9 +197,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -214,9 +214,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -231,9 +231,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -248,9 +248,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.25, - Output: 1.25, - CacheRead: nil, + Input: 0.25, + Output: 1.25, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -265,9 +265,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: nil, + Input: 15, + Output: 75, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -282,9 +282,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: nil, + Input: 3, + Output: 15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -299,9 +299,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.8, - Output: 2.4, - CacheRead: nil, + Input: 0.8, + Output: 2.4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -316,9 +316,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -333,9 +333,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -350,9 +350,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -367,9 +367,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 8, - Output: 24, - CacheRead: nil, + Input: 8, + Output: 24, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -384,9 +384,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 8, - Output: 24, - CacheRead: nil, + Input: 8, + Output: 24, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -401,9 +401,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.6, - CacheRead: nil, + Input: 0.3, + Output: 0.6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -418,9 +418,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: nil, + Input: 3, + Output: 15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -435,9 +435,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 1.5, - CacheRead: nil, + Input: 0.5, + Output: 1.5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -452,9 +452,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1.5, - Output: 2, - CacheRead: nil, + Input: 1.5, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -469,9 +469,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.35, - Output: 5.4, - CacheRead: nil, + Input: 1.35, + Output: 5.4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -486,9 +486,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.72, - Output: 0.72, - CacheRead: nil, + Input: 0.72, + Output: 0.72, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -503,9 +503,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.22, - Output: 0.22, - CacheRead: nil, + Input: 0.22, + Output: 0.22, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -520,9 +520,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.16, - Output: 0.16, - CacheRead: nil, + Input: 0.16, + Output: 0.16, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -537,9 +537,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.1, - CacheRead: nil, + Input: 0.1, + Output: 0.1, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -554,9 +554,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.15, - CacheRead: nil, + Input: 0.15, + Output: 0.15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -571,9 +571,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.72, - Output: 0.72, - CacheRead: nil, + Input: 0.72, + Output: 0.72, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -588,9 +588,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.72, - Output: 0.72, - CacheRead: nil, + Input: 0.72, + Output: 0.72, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -605,9 +605,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2.65, - Output: 3.5, - CacheRead: nil, + Input: 2.65, + Output: 3.5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -622,9 +622,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.6, - CacheRead: nil, + Input: 0.3, + Output: 0.6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -639,9 +639,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.24, - Output: 0.97, - CacheRead: nil, + Input: 0.24, + Output: 0.97, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -656,9 +656,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.17, - Output: 0.66, - CacheRead: nil, + Input: 0.17, + Output: 0.66, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -670,7 +670,7 @@ func GetModelsData() map[string]ProviderInfo { }, "anthropic": { ID: "anthropic", - Env: []string{"ANTHROPIC_API_KEY" }, + Env: []string{"ANTHROPIC_API_KEY"}, NPM: "@ai-sdk/anthropic", Name: "Anthropic", Models: map[string]ModelInfo{ @@ -681,9 +681,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.8, - Output: 4, - CacheRead: &[]float64{0.08}[0], + Input: 0.8, + Output: 4, + CacheRead: &[]float64{0.08}[0], CacheWrite: &[]float64{1}[0], }, Limit: Limit{ @@ -698,9 +698,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -715,9 +715,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -732,9 +732,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -749,9 +749,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.25, - Output: 1.25, - CacheRead: &[]float64{0.03}[0], + Input: 0.25, + Output: 1.25, + CacheRead: &[]float64{0.03}[0], CacheWrite: &[]float64{0.3}[0], }, Limit: Limit{ @@ -766,9 +766,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -783,9 +783,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{0.3}[0], }, Limit: Limit{ @@ -800,9 +800,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -817,9 +817,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -834,9 +834,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -848,7 +848,7 @@ func GetModelsData() map[string]ProviderInfo { }, "azure": { ID: "azure", - Env: []string{"AZURE_RESOURCE_NAME", "AZURE_API_KEY" }, + Env: []string{"AZURE_RESOURCE_NAME", "AZURE_API_KEY"}, NPM: "@ai-sdk/azure", Name: "Azure", Models: map[string]ModelInfo{ @@ -859,9 +859,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.5, - Output: 6, - CacheRead: &[]float64{0.375}[0], + Input: 1.5, + Output: 6, + CacheRead: &[]float64{0.375}[0], CacheWrite: nil, }, Limit: Limit{ @@ -876,9 +876,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 1.5, - CacheRead: nil, + Input: 0.5, + Output: 1.5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -893,9 +893,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1.5, - Output: 2, - CacheRead: nil, + Input: 1.5, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -910,9 +910,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 4, - CacheRead: nil, + Input: 3, + Output: 4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -927,9 +927,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1, - Output: 2, - CacheRead: nil, + Input: 1, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -944,9 +944,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1.5, - Output: 2, - CacheRead: nil, + Input: 1.5, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -961,9 +961,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 60, - Output: 120, - CacheRead: nil, + Input: 60, + Output: 120, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -978,9 +978,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 60, - Output: 120, - CacheRead: nil, + Input: 60, + Output: 120, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -995,9 +995,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 10, - Output: 30, - CacheRead: nil, + Input: 10, + Output: 30, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1012,9 +1012,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 10, - Output: 30, - CacheRead: nil, + Input: 10, + Output: 30, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1029,9 +1029,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1046,9 +1046,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.4, - Output: 1.6, - CacheRead: &[]float64{0.1}[0], + Input: 0.4, + Output: 1.6, + CacheRead: &[]float64{0.1}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1063,9 +1063,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.4, - CacheRead: &[]float64{0.03}[0], + Input: 0.1, + Output: 0.4, + CacheRead: &[]float64{0.03}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1080,9 +1080,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2.5, - Output: 10, - CacheRead: &[]float64{1.25}[0], + Input: 2.5, + Output: 10, + CacheRead: &[]float64{1.25}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1097,9 +1097,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: &[]float64{0.08}[0], + Input: 0.15, + Output: 0.6, + CacheRead: &[]float64{0.08}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1114,9 +1114,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 15, - Output: 60, - CacheRead: &[]float64{7.5}[0], + Input: 15, + Output: 60, + CacheRead: &[]float64{7.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1131,9 +1131,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.55}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.55}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1148,9 +1148,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 16.5, - Output: 66, - CacheRead: &[]float64{8.25}[0], + Input: 16.5, + Output: 66, + CacheRead: &[]float64{8.25}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1165,9 +1165,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1182,9 +1182,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.55}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.55}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1199,9 +1199,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.28}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.28}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1213,7 +1213,7 @@ func GetModelsData() map[string]ProviderInfo { }, "cerebras": { ID: "cerebras", - Env: []string{"CEREBRAS_API_KEY" }, + Env: []string{"CEREBRAS_API_KEY"}, NPM: "@ai-sdk/cerebras", Name: "Cerebras", Models: map[string]ModelInfo{ @@ -1224,9 +1224,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.25, - Output: 0.69, - CacheRead: nil, + Input: 0.25, + Output: 0.69, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1241,9 +1241,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 2, - CacheRead: nil, + Input: 2, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1255,7 +1255,7 @@ func GetModelsData() map[string]ProviderInfo { }, "chutes": { ID: "chutes", - Env: []string{"CHUTES_API_KEY" }, + Env: []string{"CHUTES_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Chutes", Models: map[string]ModelInfo{ @@ -1266,9 +1266,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.078, - Output: 0.312, - CacheRead: nil, + Input: 0.078, + Output: 0.312, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1283,9 +1283,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.078, - Output: 0.312, - CacheRead: nil, + Input: 0.078, + Output: 0.312, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1300,9 +1300,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.02, - Output: 0.08, - CacheRead: nil, + Input: 0.02, + Output: 0.08, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1317,9 +1317,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 0.8, - CacheRead: nil, + Input: 0.2, + Output: 0.8, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1334,9 +1334,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.02, - Output: 0.08, - CacheRead: nil, + Input: 0.02, + Output: 0.08, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1351,9 +1351,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.02, - Output: 0.08, - CacheRead: nil, + Input: 0.02, + Output: 0.08, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1368,9 +1368,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.18, - Output: 0.72, - CacheRead: nil, + Input: 0.18, + Output: 0.72, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1385,9 +1385,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.02, - Output: 0.07, - CacheRead: nil, + Input: 0.02, + Output: 0.07, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1402,9 +1402,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.03, - Output: 0.14, - CacheRead: nil, + Input: 0.03, + Output: 0.14, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1419,9 +1419,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.18, - Output: 0.72, - CacheRead: nil, + Input: 0.18, + Output: 0.72, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1436,9 +1436,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.59, - CacheRead: nil, + Input: 0.15, + Output: 0.59, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1453,9 +1453,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.18, - Output: 0.72, - CacheRead: nil, + Input: 0.18, + Output: 0.72, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1470,9 +1470,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 0.8, - CacheRead: nil, + Input: 0.2, + Output: 0.8, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1487,9 +1487,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1504,9 +1504,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1518,7 +1518,7 @@ func GetModelsData() map[string]ProviderInfo { }, "deepinfra": { ID: "deepinfra", - Env: []string{"DEEPINFRA_API_KEY" }, + Env: []string{"DEEPINFRA_API_KEY"}, NPM: "@ai-sdk/deepinfra", Name: "Deep Infra", Models: map[string]ModelInfo{ @@ -1529,9 +1529,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.4, - Output: 1.6, - CacheRead: nil, + Input: 0.4, + Output: 1.6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1546,9 +1546,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 1.2, - CacheRead: nil, + Input: 0.3, + Output: 1.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1563,9 +1563,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 2, - CacheRead: nil, + Input: 0.5, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1580,9 +1580,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.6, - Output: 2.2, - CacheRead: nil, + Input: 0.6, + Output: 2.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1594,7 +1594,7 @@ func GetModelsData() map[string]ProviderInfo { }, "deepseek": { ID: "deepseek", - Env: []string{"DEEPSEEK_API_KEY" }, + Env: []string{"DEEPSEEK_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "DeepSeek", Models: map[string]ModelInfo{ @@ -1605,9 +1605,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.27, - Output: 1.1, - CacheRead: &[]float64{0.07}[0], + Input: 0.27, + Output: 1.1, + CacheRead: &[]float64{0.07}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1622,9 +1622,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.55, - Output: 2.19, - CacheRead: &[]float64{0.14}[0], + Input: 0.55, + Output: 2.19, + CacheRead: &[]float64{0.14}[0], CacheWrite: nil, }, Limit: Limit{ @@ -1636,7 +1636,7 @@ func GetModelsData() map[string]ProviderInfo { }, "fireworks-ai": { ID: "fireworks-ai", - Env: []string{"FIREWORKS_API_KEY" }, + Env: []string{"FIREWORKS_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Fireworks AI", Models: map[string]ModelInfo{ @@ -1647,9 +1647,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: nil, + Input: 0.15, + Output: 0.6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1664,9 +1664,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.05, - Output: 0.2, - CacheRead: nil, + Input: 0.05, + Output: 0.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1681,9 +1681,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 8, - CacheRead: nil, + Input: 3, + Output: 8, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1698,9 +1698,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.9, - Output: 0.9, - CacheRead: nil, + Input: 0.9, + Output: 0.9, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1715,9 +1715,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1, - Output: 3, - CacheRead: nil, + Input: 1, + Output: 3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1732,9 +1732,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.22, - Output: 0.88, - CacheRead: nil, + Input: 0.22, + Output: 0.88, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1746,7 +1746,7 @@ func GetModelsData() map[string]ProviderInfo { }, "github-copilot": { ID: "github-copilot", - Env: []string{"GITHUB_TOKEN" }, + Env: []string{"GITHUB_TOKEN"}, NPM: "@ai-sdk/openai-compatible", Name: "GitHub Copilot", Models: map[string]ModelInfo{ @@ -1757,9 +1757,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1774,9 +1774,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1791,9 +1791,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1808,9 +1808,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1825,9 +1825,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1842,9 +1842,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1859,9 +1859,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1876,9 +1876,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1893,9 +1893,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1910,9 +1910,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1927,9 +1927,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1944,9 +1944,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1961,9 +1961,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1978,9 +1978,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -1992,7 +1992,7 @@ func GetModelsData() map[string]ProviderInfo { }, "github-models": { ID: "github-models", - Env: []string{"GITHUB_TOKEN" }, + Env: []string{"GITHUB_TOKEN"}, NPM: "@ai-sdk/openai-compatible", Name: "GitHub Models", Models: map[string]ModelInfo{ @@ -2003,9 +2003,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2020,9 +2020,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2037,9 +2037,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2054,9 +2054,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2071,9 +2071,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2088,9 +2088,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2105,9 +2105,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2122,9 +2122,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2139,9 +2139,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2156,9 +2156,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2173,9 +2173,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2190,9 +2190,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2207,9 +2207,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2224,9 +2224,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2241,9 +2241,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2258,9 +2258,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2275,9 +2275,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2292,9 +2292,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2309,9 +2309,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2326,9 +2326,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2343,9 +2343,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2360,9 +2360,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2377,9 +2377,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2394,9 +2394,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2411,9 +2411,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2428,9 +2428,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2445,9 +2445,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2462,9 +2462,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2479,9 +2479,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2496,9 +2496,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2513,9 +2513,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2530,9 +2530,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2547,9 +2547,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2564,9 +2564,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2581,9 +2581,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2598,9 +2598,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2615,9 +2615,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2632,9 +2632,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2649,9 +2649,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2666,9 +2666,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2683,9 +2683,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2700,9 +2700,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2717,9 +2717,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2734,9 +2734,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2751,9 +2751,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2768,9 +2768,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2785,9 +2785,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2802,9 +2802,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2819,9 +2819,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2836,9 +2836,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2853,9 +2853,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2870,9 +2870,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2887,9 +2887,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2904,9 +2904,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2921,9 +2921,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -2935,7 +2935,7 @@ func GetModelsData() map[string]ProviderInfo { }, "google": { ID: "google", - Env: []string{"GOOGLE_API_KEY", "GEMINI_API_KEY", "GOOGLE_GENERATIVE_AI_API_KEY" }, + Env: []string{"GOOGLE_API_KEY", "GEMINI_API_KEY", "GOOGLE_GENERATIVE_AI_API_KEY"}, NPM: "@ai-sdk/google", Name: "Google", Models: map[string]ModelInfo{ @@ -2946,9 +2946,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.075, - Output: 0.3, - CacheRead: &[]float64{0.01875}[0], + Input: 0.075, + Output: 0.3, + CacheRead: &[]float64{0.01875}[0], CacheWrite: nil, }, Limit: Limit{ @@ -2963,9 +2963,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.0375, - Output: 0.15, - CacheRead: &[]float64{0.01}[0], + Input: 0.0375, + Output: 0.15, + CacheRead: &[]float64{0.01}[0], CacheWrite: nil, }, Limit: Limit{ @@ -2980,9 +2980,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 5, - CacheRead: &[]float64{0.3125}[0], + Input: 1.25, + Output: 5, + CacheRead: &[]float64{0.3125}[0], CacheWrite: nil, }, Limit: Limit{ @@ -2997,9 +2997,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.4, - CacheRead: &[]float64{0.025}[0], + Input: 0.1, + Output: 0.4, + CacheRead: &[]float64{0.025}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3014,9 +3014,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.075, - Output: 0.3, - CacheRead: nil, + Input: 0.075, + Output: 0.3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3031,9 +3031,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 2.5, - CacheRead: &[]float64{0.075}[0], + Input: 0.3, + Output: 2.5, + CacheRead: &[]float64{0.075}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3048,9 +3048,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.4, - CacheRead: &[]float64{0.025}[0], + Input: 0.1, + Output: 0.4, + CacheRead: &[]float64{0.025}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3065,9 +3065,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: &[]float64{0.0375}[0], + Input: 0.15, + Output: 0.6, + CacheRead: &[]float64{0.0375}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3082,9 +3082,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: &[]float64{0.0375}[0], + Input: 0.15, + Output: 0.6, + CacheRead: &[]float64{0.0375}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3099,9 +3099,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3116,9 +3116,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3133,9 +3133,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3147,7 +3147,7 @@ func GetModelsData() map[string]ProviderInfo { }, "google-vertex": { ID: "google-vertex", - Env: []string{"GOOGLE_VERTEX_PROJECT", "GOOGLE_VERTEX_LOCATION", "GOOGLE_APPLICATION_CREDENTIALS" }, + Env: []string{"GOOGLE_VERTEX_PROJECT", "GOOGLE_VERTEX_LOCATION", "GOOGLE_APPLICATION_CREDENTIALS"}, NPM: "@ai-sdk/google-vertex", Name: "Vertex", Models: map[string]ModelInfo{ @@ -3158,9 +3158,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.4, - CacheRead: &[]float64{0.025}[0], + Input: 0.1, + Output: 0.4, + CacheRead: &[]float64{0.025}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3175,9 +3175,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.075, - Output: 0.3, - CacheRead: nil, + Input: 0.075, + Output: 0.3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3192,9 +3192,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.4, - CacheRead: &[]float64{0.025}[0], + Input: 0.1, + Output: 0.4, + CacheRead: &[]float64{0.025}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3209,9 +3209,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: &[]float64{0.0375}[0], + Input: 0.15, + Output: 0.6, + CacheRead: &[]float64{0.0375}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3226,9 +3226,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: &[]float64{0.0375}[0], + Input: 0.15, + Output: 0.6, + CacheRead: &[]float64{0.0375}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3243,9 +3243,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3260,9 +3260,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3277,9 +3277,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -3291,7 +3291,7 @@ func GetModelsData() map[string]ProviderInfo { }, "google-vertex-anthropic": { ID: "google-vertex-anthropic", - Env: []string{"GOOGLE_VERTEX_PROJECT", "GOOGLE_VERTEX_LOCATION", "GOOGLE_APPLICATION_CREDENTIALS" }, + Env: []string{"GOOGLE_VERTEX_PROJECT", "GOOGLE_VERTEX_LOCATION", "GOOGLE_APPLICATION_CREDENTIALS"}, NPM: "@ai-sdk/google-vertex/anthropic", Name: "Vertex", Models: map[string]ModelInfo{ @@ -3302,9 +3302,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.8, - Output: 4, - CacheRead: &[]float64{0.08}[0], + Input: 0.8, + Output: 4, + CacheRead: &[]float64{0.08}[0], CacheWrite: &[]float64{1}[0], }, Limit: Limit{ @@ -3319,9 +3319,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -3336,9 +3336,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -3353,9 +3353,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -3370,9 +3370,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -3387,9 +3387,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -3401,7 +3401,7 @@ func GetModelsData() map[string]ProviderInfo { }, "groq": { ID: "groq", - Env: []string{"GROQ_API_KEY" }, + Env: []string{"GROQ_API_KEY"}, NPM: "@ai-sdk/groq", Name: "Groq", Models: map[string]ModelInfo{ @@ -3412,9 +3412,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.75, - Output: 0.99, - CacheRead: nil, + Input: 0.75, + Output: 0.99, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3429,9 +3429,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 0.2, - CacheRead: nil, + Input: 0.2, + Output: 0.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3446,9 +3446,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.05, - Output: 0.08, - CacheRead: nil, + Input: 0.05, + Output: 0.08, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3463,9 +3463,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.59, - Output: 0.79, - CacheRead: nil, + Input: 0.59, + Output: 0.79, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3480,9 +3480,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 0.2, - CacheRead: nil, + Input: 0.2, + Output: 0.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3497,9 +3497,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.59, - Output: 0.79, - CacheRead: nil, + Input: 0.59, + Output: 0.79, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3514,9 +3514,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.05, - Output: 0.08, - CacheRead: nil, + Input: 0.05, + Output: 0.08, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3531,9 +3531,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 0.6, - CacheRead: nil, + Input: 0.2, + Output: 0.6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3548,9 +3548,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.11, - Output: 0.34, - CacheRead: nil, + Input: 0.11, + Output: 0.34, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3565,9 +3565,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 0.2, - CacheRead: nil, + Input: 0.2, + Output: 0.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3582,9 +3582,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.79, - Output: 0.79, - CacheRead: nil, + Input: 0.79, + Output: 0.79, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3599,9 +3599,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1, - Output: 3, - CacheRead: nil, + Input: 1, + Output: 3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3616,9 +3616,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.75, - CacheRead: nil, + Input: 0.15, + Output: 0.75, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3633,9 +3633,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.5, - CacheRead: nil, + Input: 0.1, + Output: 0.5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3650,9 +3650,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.29, - Output: 0.39, - CacheRead: nil, + Input: 0.29, + Output: 0.39, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3667,9 +3667,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.29, - Output: 0.59, - CacheRead: nil, + Input: 0.29, + Output: 0.59, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3681,7 +3681,7 @@ func GetModelsData() map[string]ProviderInfo { }, "huggingface": { ID: "huggingface", - Env: []string{"HF_TOKEN" }, + Env: []string{"HF_TOKEN"}, NPM: "@ai-sdk/openai-compatible", Name: "Hugging Face", Models: map[string]ModelInfo{ @@ -3692,9 +3692,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 3, - CacheRead: nil, + Input: 0.3, + Output: 3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3709,9 +3709,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 2, - CacheRead: nil, + Input: 2, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3726,9 +3726,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 5, - CacheRead: nil, + Input: 3, + Output: 5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3743,9 +3743,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 1.25, - CacheRead: nil, + Input: 1.25, + Output: 1.25, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3760,9 +3760,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1, - Output: 3, - CacheRead: nil, + Input: 1, + Output: 3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3777,9 +3777,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.6, - Output: 2.2, - CacheRead: nil, + Input: 0.6, + Output: 2.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3794,9 +3794,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 1.1, - CacheRead: nil, + Input: 0.2, + Output: 1.1, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3808,7 +3808,7 @@ func GetModelsData() map[string]ProviderInfo { }, "inception": { ID: "inception", - Env: []string{"INCEPTION_API_KEY" }, + Env: []string{"INCEPTION_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Inception", Models: map[string]ModelInfo{ @@ -3819,9 +3819,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.25, - Output: 1, - CacheRead: &[]float64{0.25}[0], + Input: 0.25, + Output: 1, + CacheRead: &[]float64{0.25}[0], CacheWrite: &[]float64{1}[0], }, Limit: Limit{ @@ -3836,9 +3836,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.25, - Output: 1, - CacheRead: &[]float64{0.25}[0], + Input: 0.25, + Output: 1, + CacheRead: &[]float64{0.25}[0], CacheWrite: &[]float64{1}[0], }, Limit: Limit{ @@ -3850,7 +3850,7 @@ func GetModelsData() map[string]ProviderInfo { }, "inference": { ID: "inference", - Env: []string{"INFERENCE_API_KEY" }, + Env: []string{"INFERENCE_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Inference", Models: map[string]ModelInfo{ @@ -3861,9 +3861,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.3, - CacheRead: nil, + Input: 0.15, + Output: 0.3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3878,9 +3878,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.025, - Output: 0.025, - CacheRead: nil, + Input: 0.025, + Output: 0.025, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3895,9 +3895,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.055, - Output: 0.055, - CacheRead: nil, + Input: 0.055, + Output: 0.055, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3912,9 +3912,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.01, - Output: 0.01, - CacheRead: nil, + Input: 0.01, + Output: 0.01, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3929,9 +3929,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.02, - Output: 0.02, - CacheRead: nil, + Input: 0.02, + Output: 0.02, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3946,9 +3946,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.038, - Output: 0.1, - CacheRead: nil, + Input: 0.038, + Output: 0.1, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3963,9 +3963,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.5, - CacheRead: nil, + Input: 0.1, + Output: 0.5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3980,9 +3980,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 0.2, - CacheRead: nil, + Input: 0.2, + Output: 0.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -3997,9 +3997,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: false, Cost: Cost{ - Input: 0.01, - Output: 0, - CacheRead: nil, + Input: 0.01, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4011,7 +4011,7 @@ func GetModelsData() map[string]ProviderInfo { }, "llama": { ID: "llama", - Env: []string{"LLAMA_API_KEY" }, + Env: []string{"LLAMA_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Llama", Models: map[string]ModelInfo{ @@ -4022,9 +4022,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4039,9 +4039,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4056,9 +4056,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4073,9 +4073,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4090,9 +4090,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4107,9 +4107,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4124,9 +4124,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4138,7 +4138,7 @@ func GetModelsData() map[string]ProviderInfo { }, "lmstudio": { ID: "lmstudio", - Env: []string{"LMSTUDIO_API_KEY" }, + Env: []string{"LMSTUDIO_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "LMStudio", Models: map[string]ModelInfo{ @@ -4149,9 +4149,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4166,9 +4166,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4180,7 +4180,7 @@ func GetModelsData() map[string]ProviderInfo { }, "mistral": { ID: "mistral", - Env: []string{"MISTRAL_API_KEY" }, + Env: []string{"MISTRAL_API_KEY"}, NPM: "@ai-sdk/mistral", Name: "Mistral", Models: map[string]ModelInfo{ @@ -4191,9 +4191,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.9, - CacheRead: nil, + Input: 0.3, + Output: 0.9, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4208,9 +4208,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.4, - Output: 2, - CacheRead: nil, + Input: 0.4, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4225,9 +4225,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.3, - CacheRead: nil, + Input: 0.1, + Output: 0.3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4242,9 +4242,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.3, - CacheRead: nil, + Input: 0.1, + Output: 0.3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4259,9 +4259,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 2, - Output: 5, - CacheRead: nil, + Input: 2, + Output: 5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4276,9 +4276,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 1.5, - CacheRead: nil, + Input: 0.5, + Output: 1.5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4293,9 +4293,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.04, - Output: 0.04, - CacheRead: nil, + Input: 0.04, + Output: 0.04, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4310,9 +4310,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.1, - CacheRead: nil, + Input: 0.1, + Output: 0.1, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4327,9 +4327,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 6, - CacheRead: nil, + Input: 2, + Output: 6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4344,9 +4344,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.4, - Output: 2, - CacheRead: nil, + Input: 0.4, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4361,9 +4361,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.15, - CacheRead: nil, + Input: 0.15, + Output: 0.15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4378,9 +4378,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.3, - CacheRead: nil, + Input: 0.1, + Output: 0.3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4395,9 +4395,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.25, - Output: 0.25, - CacheRead: nil, + Input: 0.25, + Output: 0.25, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4412,9 +4412,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 6, - CacheRead: nil, + Input: 2, + Output: 6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4429,9 +4429,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.7, - Output: 0.7, - CacheRead: nil, + Input: 0.7, + Output: 0.7, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4446,9 +4446,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.15, - CacheRead: nil, + Input: 0.15, + Output: 0.15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4463,9 +4463,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 6, - CacheRead: nil, + Input: 2, + Output: 6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4477,7 +4477,7 @@ func GetModelsData() map[string]ProviderInfo { }, "modelscope": { ID: "modelscope", - Env: []string{"MODELSCOPE_API_KEY" }, + Env: []string{"MODELSCOPE_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "ModelScope", Models: map[string]ModelInfo{ @@ -4488,9 +4488,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4505,9 +4505,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4522,9 +4522,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4539,9 +4539,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4556,9 +4556,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4573,9 +4573,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4590,9 +4590,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4607,9 +4607,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4621,7 +4621,7 @@ func GetModelsData() map[string]ProviderInfo { }, "morph": { ID: "morph", - Env: []string{"MORPH_API_KEY" }, + Env: []string{"MORPH_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Morph", Models: map[string]ModelInfo{ @@ -4632,9 +4632,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: false, Cost: Cost{ - Input: 0.85, - Output: 1.55, - CacheRead: nil, + Input: 0.85, + Output: 1.55, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4649,9 +4649,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: false, Cost: Cost{ - Input: 0.8, - Output: 1.2, - CacheRead: nil, + Input: 0.8, + Output: 1.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4666,9 +4666,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: false, Cost: Cost{ - Input: 0.9, - Output: 1.9, - CacheRead: nil, + Input: 0.9, + Output: 1.9, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4680,7 +4680,7 @@ func GetModelsData() map[string]ProviderInfo { }, "openai": { ID: "openai", - Env: []string{"OPENAI_API_KEY" }, + Env: []string{"OPENAI_API_KEY"}, NPM: "@ai-sdk/openai", Name: "OpenAI", Models: map[string]ModelInfo{ @@ -4691,9 +4691,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.5, - Output: 6, - CacheRead: &[]float64{0.375}[0], + Input: 1.5, + Output: 6, + CacheRead: &[]float64{0.375}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4708,9 +4708,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 1.5, - CacheRead: &[]float64{1.25}[0], + Input: 0.5, + Output: 1.5, + CacheRead: &[]float64{1.25}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4725,9 +4725,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 10, - Output: 30, - CacheRead: nil, + Input: 10, + Output: 30, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4742,9 +4742,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 10, - Output: 30, - CacheRead: nil, + Input: 10, + Output: 30, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4759,9 +4759,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4776,9 +4776,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.4, - Output: 1.6, - CacheRead: &[]float64{0.1}[0], + Input: 0.4, + Output: 1.6, + CacheRead: &[]float64{0.1}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4793,9 +4793,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.4, - CacheRead: &[]float64{0.03}[0], + Input: 0.1, + Output: 0.4, + CacheRead: &[]float64{0.03}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4810,9 +4810,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2.5, - Output: 10, - CacheRead: &[]float64{1.25}[0], + Input: 2.5, + Output: 10, + CacheRead: &[]float64{1.25}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4827,9 +4827,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: &[]float64{0.08}[0], + Input: 0.15, + Output: 0.6, + CacheRead: &[]float64{0.08}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4844,9 +4844,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: nil, + Input: 1.25, + Output: 10, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4861,9 +4861,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0.25, - Output: 2, - CacheRead: nil, + Input: 0.25, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4878,9 +4878,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0.05, - Output: 0.4, - CacheRead: nil, + Input: 0.05, + Output: 0.4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4895,9 +4895,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 15, - Output: 60, - CacheRead: &[]float64{7.5}[0], + Input: 15, + Output: 60, + CacheRead: &[]float64{7.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4912,9 +4912,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.55}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.55}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4929,9 +4929,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 60, - CacheRead: &[]float64{7.5}[0], + Input: 15, + Output: 60, + CacheRead: &[]float64{7.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4946,9 +4946,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 150, - Output: 600, - CacheRead: nil, + Input: 150, + Output: 600, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -4963,9 +4963,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4980,9 +4980,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 10, - Output: 40, - CacheRead: &[]float64{2.5}[0], + Input: 10, + Output: 40, + CacheRead: &[]float64{2.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -4997,9 +4997,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.55}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.55}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5014,9 +5014,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 20, - Output: 80, - CacheRead: nil, + Input: 20, + Output: 80, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5031,9 +5031,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.28}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.28}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5048,9 +5048,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5062,7 +5062,7 @@ func GetModelsData() map[string]ProviderInfo { }, "opencode": { ID: "opencode", - Env: []string{"OPENCODE_API_KEY" }, + Env: []string{"OPENCODE_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "opencode", Models: map[string]ModelInfo{ @@ -5073,9 +5073,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -5090,9 +5090,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5107,9 +5107,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: &[]float64{0}[0], + Input: 0, + Output: 0, + CacheRead: &[]float64{0}[0], CacheWrite: &[]float64{0}[0], }, Limit: Limit{ @@ -5121,7 +5121,7 @@ func GetModelsData() map[string]ProviderInfo { }, "openrouter": { ID: "openrouter", - Env: []string{"OPENROUTER_API_KEY" }, + Env: []string{"OPENROUTER_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "OpenRouter", Models: map[string]ModelInfo{ @@ -5132,9 +5132,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.8, - Output: 4, - CacheRead: &[]float64{0.08}[0], + Input: 0.8, + Output: 4, + CacheRead: &[]float64{0.08}[0], CacheWrite: &[]float64{1}[0], }, Limit: Limit{ @@ -5149,9 +5149,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -5166,9 +5166,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -5183,9 +5183,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -5200,9 +5200,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -5217,9 +5217,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5234,9 +5234,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5251,9 +5251,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5268,9 +5268,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5285,9 +5285,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5302,9 +5302,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5319,9 +5319,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5336,9 +5336,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5353,9 +5353,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5370,9 +5370,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5387,9 +5387,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.4, - CacheRead: &[]float64{0.025}[0], + Input: 0.1, + Output: 0.4, + CacheRead: &[]float64{0.025}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5404,9 +5404,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5421,9 +5421,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 2.5, - CacheRead: &[]float64{0.0375}[0], + Input: 0.3, + Output: 2.5, + CacheRead: &[]float64{0.0375}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5438,9 +5438,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5455,9 +5455,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5472,9 +5472,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5489,9 +5489,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5506,9 +5506,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5523,9 +5523,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5540,9 +5540,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5557,9 +5557,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5574,9 +5574,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5591,9 +5591,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5608,9 +5608,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5625,9 +5625,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5642,9 +5642,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.9, - CacheRead: nil, + Input: 0.3, + Output: 0.9, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5659,9 +5659,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.4, - Output: 2, - CacheRead: nil, + Input: 0.4, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5676,9 +5676,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.06, - Output: 0.12, - CacheRead: nil, + Input: 0.06, + Output: 0.12, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5693,9 +5693,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5710,9 +5710,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.3, - CacheRead: nil, + Input: 0.1, + Output: 0.3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5727,9 +5727,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5744,9 +5744,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5761,9 +5761,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5778,9 +5778,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5795,9 +5795,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5812,9 +5812,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5829,9 +5829,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.55, - Output: 2.2, - CacheRead: nil, + Input: 0.55, + Output: 2.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5846,9 +5846,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5863,9 +5863,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5880,9 +5880,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5897,9 +5897,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.4, - Output: 1.6, - CacheRead: &[]float64{0.1}[0], + Input: 0.4, + Output: 1.6, + CacheRead: &[]float64{0.1}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5914,9 +5914,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: &[]float64{0.08}[0], + Input: 0.15, + Output: 0.6, + CacheRead: &[]float64{0.08}[0], CacheWrite: nil, }, Limit: Limit{ @@ -5931,9 +5931,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: nil, + Input: 1.25, + Output: 10, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5948,9 +5948,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.25, - Output: 2, - CacheRead: nil, + Input: 0.25, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5965,9 +5965,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.05, - Output: 0.4, - CacheRead: nil, + Input: 0.05, + Output: 0.4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5982,9 +5982,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: nil, + Input: 0.15, + Output: 0.6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -5999,9 +5999,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.05, - Output: 0.2, - CacheRead: nil, + Input: 0.05, + Output: 0.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6016,9 +6016,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.28}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.28}[0], CacheWrite: nil, }, Limit: Limit{ @@ -6033,9 +6033,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6050,9 +6050,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6067,9 +6067,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: false, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6084,9 +6084,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6101,9 +6101,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6118,9 +6118,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6135,9 +6135,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6152,9 +6152,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6169,9 +6169,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.85, - CacheRead: nil, + Input: 0.15, + Output: 0.85, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6186,9 +6186,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6203,9 +6203,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6220,9 +6220,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 0.8, - CacheRead: nil, + Input: 0.2, + Output: 0.8, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6237,9 +6237,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6254,9 +6254,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6271,9 +6271,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6288,9 +6288,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 1.2, - CacheRead: nil, + Input: 0.3, + Output: 1.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6305,9 +6305,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6322,9 +6322,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6339,9 +6339,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6356,9 +6356,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6373,9 +6373,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6390,9 +6390,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6407,9 +6407,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.75}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.75}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -6424,9 +6424,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.75}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.75}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -6441,9 +6441,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.5, - CacheRead: &[]float64{0.075}[0], + Input: 0.3, + Output: 0.5, + CacheRead: &[]float64{0.075}[0], CacheWrite: &[]float64{0.5}[0], }, Limit: Limit{ @@ -6458,9 +6458,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.5, - CacheRead: &[]float64{0.075}[0], + Input: 0.3, + Output: 0.5, + CacheRead: &[]float64{0.075}[0], CacheWrite: &[]float64{0.5}[0], }, Limit: Limit{ @@ -6475,9 +6475,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.75}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.75}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -6492,9 +6492,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.6, - Output: 2.2, - CacheRead: nil, + Input: 0.6, + Output: 2.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6509,9 +6509,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 1.1, - CacheRead: nil, + Input: 0.2, + Output: 1.1, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6526,9 +6526,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6540,7 +6540,7 @@ func GetModelsData() map[string]ProviderInfo { }, "requesty": { ID: "requesty", - Env: []string{"REQUESTY_API_KEY" }, + Env: []string{"REQUESTY_API_KEY"}, NPM: "@requesty/ai-sdk", Name: "Requesty", Models: map[string]ModelInfo{ @@ -6551,9 +6551,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -6568,9 +6568,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -6585,9 +6585,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -6602,9 +6602,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -6619,9 +6619,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 2.5, - CacheRead: &[]float64{0.075}[0], + Input: 0.3, + Output: 2.5, + CacheRead: &[]float64{0.075}[0], CacheWrite: &[]float64{0.55}[0], }, Limit: Limit{ @@ -6636,9 +6636,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: &[]float64{2.375}[0], }, Limit: Limit{ @@ -6653,9 +6653,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -6670,9 +6670,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.4, - Output: 1.6, - CacheRead: &[]float64{0.1}[0], + Input: 0.4, + Output: 1.6, + CacheRead: &[]float64{0.1}[0], CacheWrite: nil, }, Limit: Limit{ @@ -6687,9 +6687,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: &[]float64{0.08}[0], + Input: 0.15, + Output: 0.6, + CacheRead: &[]float64{0.08}[0], CacheWrite: nil, }, Limit: Limit{ @@ -6704,9 +6704,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.28}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.28}[0], CacheWrite: nil, }, Limit: Limit{ @@ -6718,7 +6718,7 @@ func GetModelsData() map[string]ProviderInfo { }, "togetherai": { ID: "togetherai", - Env: []string{"TOGETHER_API_KEY" }, + Env: []string{"TOGETHER_API_KEY"}, NPM: "@ai-sdk/togetherai", Name: "Together AI", Models: map[string]ModelInfo{ @@ -6729,9 +6729,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 2, - CacheRead: nil, + Input: 2, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6746,9 +6746,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 7, - CacheRead: nil, + Input: 3, + Output: 7, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6763,9 +6763,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 1.25, - CacheRead: nil, + Input: 1.25, + Output: 1.25, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6780,9 +6780,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.88, - Output: 0.88, - CacheRead: nil, + Input: 0.88, + Output: 0.88, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6797,9 +6797,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1, - Output: 3, - CacheRead: nil, + Input: 1, + Output: 3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6811,7 +6811,7 @@ func GetModelsData() map[string]ProviderInfo { }, "upstage": { ID: "upstage", - Env: []string{"UPSTAGE_API_KEY" }, + Env: []string{"UPSTAGE_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Upstage", Models: map[string]ModelInfo{ @@ -6822,9 +6822,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.15, - CacheRead: nil, + Input: 0.15, + Output: 0.15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6839,9 +6839,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.25, - Output: 0.25, - CacheRead: nil, + Input: 0.25, + Output: 0.25, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6853,7 +6853,7 @@ func GetModelsData() map[string]ProviderInfo { }, "v0": { ID: "v0", - Env: []string{"V0_API_KEY" }, + Env: []string{"V0_API_KEY"}, NPM: "@ai-sdk/vercel", Name: "v0", Models: map[string]ModelInfo{ @@ -6864,9 +6864,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: nil, + Input: 3, + Output: 15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6881,9 +6881,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: nil, + Input: 15, + Output: 75, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6898,9 +6898,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: nil, + Input: 3, + Output: 15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6912,7 +6912,7 @@ func GetModelsData() map[string]ProviderInfo { }, "venice": { ID: "venice", - Env: []string{"VENICE_API_KEY" }, + Env: []string{"VENICE_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Venice AI", Models: map[string]ModelInfo{ @@ -6923,9 +6923,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 2, - CacheRead: nil, + Input: 0.5, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6940,9 +6940,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3.5, - Output: 14, - CacheRead: nil, + Input: 3.5, + Output: 14, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6957,9 +6957,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.7, - Output: 2.8, - CacheRead: nil, + Input: 0.7, + Output: 2.8, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6974,9 +6974,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1.5, - Output: 6, - CacheRead: nil, + Input: 1.5, + Output: 6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -6991,9 +6991,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: nil, + Input: 0.15, + Output: 0.6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7008,9 +7008,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.7, - Output: 2.8, - CacheRead: nil, + Input: 0.7, + Output: 2.8, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7025,9 +7025,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 2, - CacheRead: nil, + Input: 0.5, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7042,9 +7042,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 2, - CacheRead: nil, + Input: 0.5, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7059,9 +7059,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 2, - CacheRead: nil, + Input: 0.5, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7076,9 +7076,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.7, - Output: 2.8, - CacheRead: nil, + Input: 0.7, + Output: 2.8, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7093,9 +7093,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.5, - Output: 6, - CacheRead: nil, + Input: 1.5, + Output: 6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7110,9 +7110,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: nil, + Input: 0.15, + Output: 0.6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7127,9 +7127,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 2, - CacheRead: nil, + Input: 0.5, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7141,7 +7141,7 @@ func GetModelsData() map[string]ProviderInfo { }, "vercel": { ID: "vercel", - Env: []string{"AI_GATEWAY_API_KEY" }, + Env: []string{"AI_GATEWAY_API_KEY"}, NPM: "@ai-sdk/gateway", Name: "Vercel AI Gateway", Models: map[string]ModelInfo{ @@ -7152,9 +7152,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.06, - Output: 0.24, - CacheRead: &[]float64{0.015}[0], + Input: 0.06, + Output: 0.24, + CacheRead: &[]float64{0.015}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7169,9 +7169,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.035, - Output: 0.14, - CacheRead: &[]float64{0.00875}[0], + Input: 0.035, + Output: 0.14, + CacheRead: &[]float64{0.00875}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7186,9 +7186,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.8, - Output: 3.2, - CacheRead: &[]float64{0.2}[0], + Input: 0.8, + Output: 3.2, + CacheRead: &[]float64{0.2}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7203,9 +7203,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.8, - Output: 4, - CacheRead: &[]float64{0.08}[0], + Input: 0.8, + Output: 4, + CacheRead: &[]float64{0.08}[0], CacheWrite: &[]float64{1}[0], }, Limit: Limit{ @@ -7220,9 +7220,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.25, - Output: 1.25, - CacheRead: &[]float64{0.03}[0], + Input: 0.25, + Output: 1.25, + CacheRead: &[]float64{0.03}[0], CacheWrite: &[]float64{0.3}[0], }, Limit: Limit{ @@ -7237,9 +7237,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -7254,9 +7254,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -7271,9 +7271,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -7288,9 +7288,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -7305,9 +7305,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 15, - Output: 75, - CacheRead: &[]float64{1.5}[0], + Input: 15, + Output: 75, + CacheRead: &[]float64{1.5}[0], CacheWrite: &[]float64{18.75}[0], }, Limit: Limit{ @@ -7322,9 +7322,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.3}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.3}[0], CacheWrite: &[]float64{3.75}[0], }, Limit: Limit{ @@ -7339,9 +7339,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 2, - CacheRead: nil, + Input: 2, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7356,9 +7356,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.35, - Output: 5.4, - CacheRead: nil, + Input: 1.35, + Output: 5.4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7373,9 +7373,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.75, - Output: 0.99, - CacheRead: nil, + Input: 0.75, + Output: 0.99, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7390,9 +7390,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.4, - CacheRead: &[]float64{0.025}[0], + Input: 0.1, + Output: 0.4, + CacheRead: &[]float64{0.025}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7407,9 +7407,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.075, - Output: 0.3, - CacheRead: nil, + Input: 0.075, + Output: 0.3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7424,9 +7424,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 2.5, - CacheRead: &[]float64{0.075}[0], + Input: 0.3, + Output: 2.5, + CacheRead: &[]float64{0.075}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7441,9 +7441,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: &[]float64{0.31}[0], + Input: 1.25, + Output: 10, + CacheRead: &[]float64{0.31}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7458,9 +7458,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7475,9 +7475,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7492,9 +7492,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: nil, + Input: 0, + Output: 0, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7509,9 +7509,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.9, - CacheRead: nil, + Input: 0.3, + Output: 0.9, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7526,9 +7526,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 2, - Output: 5, - CacheRead: nil, + Input: 2, + Output: 5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7543,9 +7543,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.5, - Output: 1.5, - CacheRead: nil, + Input: 0.5, + Output: 1.5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7560,9 +7560,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.04, - Output: 0.04, - CacheRead: nil, + Input: 0.04, + Output: 0.04, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7577,9 +7577,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.1, - CacheRead: nil, + Input: 0.1, + Output: 0.1, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7594,9 +7594,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 6, - CacheRead: nil, + Input: 2, + Output: 6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7611,9 +7611,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.3, - CacheRead: nil, + Input: 0.1, + Output: 0.3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7628,9 +7628,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 6, - CacheRead: nil, + Input: 2, + Output: 6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7645,9 +7645,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.15, - CacheRead: nil, + Input: 0.15, + Output: 0.15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7662,9 +7662,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 6, - CacheRead: nil, + Input: 2, + Output: 6, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7679,9 +7679,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1, - Output: 3, - CacheRead: nil, + Input: 1, + Output: 3, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7696,9 +7696,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: false, Cost: Cost{ - Input: 0.8, - Output: 1.2, - CacheRead: nil, + Input: 0.8, + Output: 1.2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7713,9 +7713,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: false, Cost: Cost{ - Input: 0.9, - Output: 1.9, - CacheRead: nil, + Input: 0.9, + Output: 1.9, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7730,9 +7730,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 10, - Output: 30, - CacheRead: nil, + Input: 10, + Output: 30, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7747,9 +7747,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7764,9 +7764,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.4, - Output: 1.6, - CacheRead: &[]float64{0.1}[0], + Input: 0.4, + Output: 1.6, + CacheRead: &[]float64{0.1}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7781,9 +7781,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.4, - CacheRead: &[]float64{0.03}[0], + Input: 0.1, + Output: 0.4, + CacheRead: &[]float64{0.03}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7798,9 +7798,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2.5, - Output: 10, - CacheRead: &[]float64{1.25}[0], + Input: 2.5, + Output: 10, + CacheRead: &[]float64{1.25}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7815,9 +7815,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.15, - Output: 0.6, - CacheRead: &[]float64{0.08}[0], + Input: 0.15, + Output: 0.6, + CacheRead: &[]float64{0.08}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7832,9 +7832,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.25, - Output: 10, - CacheRead: nil, + Input: 1.25, + Output: 10, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7849,9 +7849,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0.25, - Output: 2, - CacheRead: nil, + Input: 0.25, + Output: 2, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7866,9 +7866,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 0.05, - Output: 0.4, - CacheRead: nil, + Input: 0.05, + Output: 0.4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7883,9 +7883,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 15, - Output: 60, - CacheRead: &[]float64{7.5}[0], + Input: 15, + Output: 60, + CacheRead: &[]float64{7.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7900,9 +7900,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 2, - Output: 8, - CacheRead: &[]float64{0.5}[0], + Input: 2, + Output: 8, + CacheRead: &[]float64{0.5}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7917,9 +7917,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.55}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.55}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7934,9 +7934,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: false, Cost: Cost{ - Input: 1.1, - Output: 4.4, - CacheRead: &[]float64{0.28}[0], + Input: 1.1, + Output: 4.4, + CacheRead: &[]float64{0.28}[0], CacheWrite: nil, }, Limit: Limit{ @@ -7951,9 +7951,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: nil, + Input: 3, + Output: 15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7968,9 +7968,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: nil, + Input: 3, + Output: 15, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -7985,9 +7985,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 10, - CacheRead: &[]float64{2}[0], + Input: 2, + Output: 10, + CacheRead: &[]float64{2}[0], CacheWrite: &[]float64{10}[0], }, Limit: Limit{ @@ -8002,9 +8002,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 10, - CacheRead: &[]float64{2}[0], + Input: 2, + Output: 10, + CacheRead: &[]float64{2}[0], CacheWrite: &[]float64{10}[0], }, Limit: Limit{ @@ -8019,9 +8019,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.75}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.75}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -8036,9 +8036,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 5, - Output: 25, - CacheRead: &[]float64{1.25}[0], + Input: 5, + Output: 25, + CacheRead: &[]float64{1.25}[0], CacheWrite: &[]float64{25}[0], }, Limit: Limit{ @@ -8053,9 +8053,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.5, - CacheRead: &[]float64{0.075}[0], + Input: 0.3, + Output: 0.5, + CacheRead: &[]float64{0.075}[0], CacheWrite: &[]float64{0.5}[0], }, Limit: Limit{ @@ -8070,9 +8070,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.6, - Output: 4, - CacheRead: &[]float64{0.15}[0], + Input: 0.6, + Output: 4, + CacheRead: &[]float64{0.15}[0], CacheWrite: &[]float64{4}[0], }, Limit: Limit{ @@ -8087,9 +8087,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.75}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.75}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -8101,7 +8101,7 @@ func GetModelsData() map[string]ProviderInfo { }, "wandb": { ID: "wandb", - Env: []string{"WANDB_API_KEY" }, + Env: []string{"WANDB_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Weights & Biases", Models: map[string]ModelInfo{ @@ -8112,9 +8112,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.1, - CacheRead: nil, + Input: 0.1, + Output: 0.1, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8129,9 +8129,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.1, - Output: 0.1, - CacheRead: nil, + Input: 0.1, + Output: 0.1, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8146,9 +8146,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1, - Output: 1.5, - CacheRead: nil, + Input: 1, + Output: 1.5, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8163,9 +8163,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 1.35, - Output: 5.4, - CacheRead: nil, + Input: 1.35, + Output: 5.4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8180,9 +8180,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1.14, - Output: 2.75, - CacheRead: nil, + Input: 1.14, + Output: 2.75, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8197,9 +8197,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.22, - Output: 0.22, - CacheRead: nil, + Input: 0.22, + Output: 0.22, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8214,9 +8214,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.71, - Output: 0.71, - CacheRead: nil, + Input: 0.71, + Output: 0.71, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8231,9 +8231,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.17, - Output: 0.66, - CacheRead: nil, + Input: 0.17, + Output: 0.66, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8248,9 +8248,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.08, - Output: 0.35, - CacheRead: nil, + Input: 0.08, + Output: 0.35, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8265,9 +8265,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 1.35, - Output: 4, - CacheRead: nil, + Input: 1.35, + Output: 4, + CacheRead: nil, CacheWrite: nil, }, Limit: Limit{ @@ -8279,7 +8279,7 @@ func GetModelsData() map[string]ProviderInfo { }, "xai": { ID: "xai", - Env: []string{"XAI_API_KEY" }, + Env: []string{"XAI_API_KEY"}, NPM: "@ai-sdk/xai", Name: "xAI", Models: map[string]ModelInfo{ @@ -8290,9 +8290,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 10, - CacheRead: &[]float64{2}[0], + Input: 2, + Output: 10, + CacheRead: &[]float64{2}[0], CacheWrite: &[]float64{10}[0], }, Limit: Limit{ @@ -8307,9 +8307,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 10, - CacheRead: &[]float64{2}[0], + Input: 2, + Output: 10, + CacheRead: &[]float64{2}[0], CacheWrite: &[]float64{10}[0], }, Limit: Limit{ @@ -8324,9 +8324,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 10, - CacheRead: &[]float64{2}[0], + Input: 2, + Output: 10, + CacheRead: &[]float64{2}[0], CacheWrite: &[]float64{10}[0], }, Limit: Limit{ @@ -8341,9 +8341,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 10, - CacheRead: &[]float64{2}[0], + Input: 2, + Output: 10, + CacheRead: &[]float64{2}[0], CacheWrite: &[]float64{10}[0], }, Limit: Limit{ @@ -8358,9 +8358,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 10, - CacheRead: &[]float64{2}[0], + Input: 2, + Output: 10, + CacheRead: &[]float64{2}[0], CacheWrite: &[]float64{10}[0], }, Limit: Limit{ @@ -8375,9 +8375,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 2, - Output: 10, - CacheRead: &[]float64{2}[0], + Input: 2, + Output: 10, + CacheRead: &[]float64{2}[0], CacheWrite: &[]float64{10}[0], }, Limit: Limit{ @@ -8392,9 +8392,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.75}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.75}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -8409,9 +8409,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 5, - Output: 25, - CacheRead: &[]float64{1.25}[0], + Input: 5, + Output: 25, + CacheRead: &[]float64{1.25}[0], CacheWrite: &[]float64{25}[0], }, Limit: Limit{ @@ -8426,9 +8426,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 5, - Output: 25, - CacheRead: &[]float64{1.25}[0], + Input: 5, + Output: 25, + CacheRead: &[]float64{1.25}[0], CacheWrite: &[]float64{25}[0], }, Limit: Limit{ @@ -8443,9 +8443,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.75}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.75}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -8460,9 +8460,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.5, - CacheRead: &[]float64{0.075}[0], + Input: 0.3, + Output: 0.5, + CacheRead: &[]float64{0.075}[0], CacheWrite: &[]float64{0.5}[0], }, Limit: Limit{ @@ -8477,9 +8477,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.6, - Output: 4, - CacheRead: &[]float64{0.15}[0], + Input: 0.6, + Output: 4, + CacheRead: &[]float64{0.15}[0], CacheWrite: &[]float64{4}[0], }, Limit: Limit{ @@ -8494,9 +8494,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.6, - Output: 4, - CacheRead: &[]float64{0.15}[0], + Input: 0.6, + Output: 4, + CacheRead: &[]float64{0.15}[0], CacheWrite: &[]float64{4}[0], }, Limit: Limit{ @@ -8511,9 +8511,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.3, - Output: 0.5, - CacheRead: &[]float64{0.075}[0], + Input: 0.3, + Output: 0.5, + CacheRead: &[]float64{0.075}[0], CacheWrite: &[]float64{0.5}[0], }, Limit: Limit{ @@ -8528,9 +8528,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 3, - Output: 15, - CacheRead: &[]float64{0.75}[0], + Input: 3, + Output: 15, + CacheRead: &[]float64{0.75}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -8545,9 +8545,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 5, - Output: 15, - CacheRead: &[]float64{5}[0], + Input: 5, + Output: 15, + CacheRead: &[]float64{5}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -8562,9 +8562,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: false, Temperature: true, Cost: Cost{ - Input: 5, - Output: 15, - CacheRead: &[]float64{5}[0], + Input: 5, + Output: 15, + CacheRead: &[]float64{5}[0], CacheWrite: &[]float64{15}[0], }, Limit: Limit{ @@ -8576,7 +8576,7 @@ func GetModelsData() map[string]ProviderInfo { }, "zhipuai": { ID: "zhipuai", - Env: []string{"ZHIPU_API_KEY" }, + Env: []string{"ZHIPU_API_KEY"}, NPM: "@ai-sdk/openai-compatible", Name: "Zhipu AI", Models: map[string]ModelInfo{ @@ -8587,9 +8587,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.6, - Output: 2.2, - CacheRead: &[]float64{0.11}[0], + Input: 0.6, + Output: 2.2, + CacheRead: &[]float64{0.11}[0], CacheWrite: &[]float64{0}[0], }, Limit: Limit{ @@ -8604,9 +8604,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0.2, - Output: 1.1, - CacheRead: &[]float64{0.03}[0], + Input: 0.2, + Output: 1.1, + CacheRead: &[]float64{0.03}[0], CacheWrite: &[]float64{0}[0], }, Limit: Limit{ @@ -8621,9 +8621,9 @@ func GetModelsData() map[string]ProviderInfo { Reasoning: true, Temperature: true, Cost: Cost{ - Input: 0, - Output: 0, - CacheRead: &[]float64{0}[0], + Input: 0, + Output: 0, + CacheRead: &[]float64{0}[0], CacheWrite: &[]float64{0}[0], }, Limit: Limit{ diff --git a/internal/tools/buffered_logger.go b/internal/tools/buffered_logger.go new file mode 100644 index 00000000..7ab75ddd --- /dev/null +++ b/internal/tools/buffered_logger.go @@ -0,0 +1,45 @@ +package tools + +import ( + "sync" +) + +// BufferedDebugLogger stores debug messages until they can be displayed +type BufferedDebugLogger struct { + enabled bool + messages []string + mu sync.Mutex +} + +// NewBufferedDebugLogger creates a new buffered debug logger +func NewBufferedDebugLogger(enabled bool) *BufferedDebugLogger { + return &BufferedDebugLogger{ + enabled: enabled, + messages: make([]string, 0), + } +} + +// LogDebug stores a debug message +func (l *BufferedDebugLogger) LogDebug(message string) { + if !l.enabled { + return + } + l.mu.Lock() + defer l.mu.Unlock() + l.messages = append(l.messages, message) +} + +// IsDebugEnabled returns whether debug logging is enabled +func (l *BufferedDebugLogger) IsDebugEnabled() bool { + return l.enabled +} + +// GetMessages returns all buffered messages and clears the buffer +func (l *BufferedDebugLogger) GetMessages() []string { + l.mu.Lock() + defer l.mu.Unlock() + messages := make([]string, len(l.messages)) + copy(messages, l.messages) + l.messages = l.messages[:0] // Clear the buffer + return messages +} diff --git a/internal/tools/connection_pool.go b/internal/tools/connection_pool.go index 1e97a202..e98db559 100644 --- a/internal/tools/connection_pool.go +++ b/internal/tools/connection_pool.go @@ -55,10 +55,12 @@ type MCPConnectionPool struct { model model.ToolCallingChatModel ctx context.Context cancel context.CancelFunc + debug bool + debugLogger DebugLogger } // NewMCPConnectionPool creates a new connection pool -func NewMCPConnectionPool(config *ConnectionPoolConfig, model model.ToolCallingChatModel) *MCPConnectionPool { +func NewMCPConnectionPool(config *ConnectionPoolConfig, model model.ToolCallingChatModel, debug bool) *MCPConnectionPool { if config == nil { config = DefaultConnectionPoolConfig() } @@ -70,12 +72,20 @@ func NewMCPConnectionPool(config *ConnectionPoolConfig, model model.ToolCallingC model: model, ctx: ctx, cancel: cancel, + debug: debug, } go pool.startHealthCheck() return pool } +// SetDebugLogger sets the debug logger for the connection pool +func (p *MCPConnectionPool) SetDebugLogger(logger DebugLogger) { + p.mu.Lock() + defer p.mu.Unlock() + p.debugLogger = logger +} + // GetConnection gets a connection from the pool func (p *MCPConnectionPool) GetConnection(ctx context.Context, serverName string, serverConfig config.MCPServerConfig) (*MCPConnection, error) { p.mu.Lock() @@ -90,16 +100,24 @@ func (p *MCPConnectionPool) GetConnection(ctx context.Context, serverName string conn.mu.Lock() conn.lastUsed = time.Now() conn.mu.Unlock() - fmt.Printf("🔄 [POOL] Reusing connection for %s\n", serverName) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Reusing connection for %s", serverName)) + } return conn, nil } else { - fmt.Printf("🔍 [POOL] Connection %s unhealthy, removing\n", serverName) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Connection %s unhealthy, removing", serverName)) + } + } conn.client.Close() delete(p.connections, serverName) } } - fmt.Printf("🆕 [POOL] Creating new connection for %s\n", serverName) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Creating new connection for %s", serverName)) + } conn, err := p.createConnection(ctx, serverName, serverConfig) if err != nil { return nil, fmt.Errorf("failed to create connection for %s: %w", serverName, err) @@ -125,10 +143,14 @@ func (p *MCPConnectionPool) GetConnectionWithHealthCheck(ctx context.Context, se conn.mu.Lock() conn.lastUsed = time.Now() conn.mu.Unlock() - fmt.Printf("✅ [POOL] Reusing healthy connection for %s\n", serverName) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Reusing healthy connection for %s", serverName)) + } return conn, nil } else { - fmt.Printf("🔍 [POOL] Connection %s failed health check, removing\n", serverName) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Connection %s failed health check, removing", serverName)) + } conn.client.Close() delete(p.connections, serverName) } @@ -139,7 +161,9 @@ func (p *MCPConnectionPool) GetConnectionWithHealthCheck(ctx context.Context, se } } - fmt.Printf("🆕 [POOL] Creating new connection for %s\n", serverName) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Creating new connection for %s", serverName)) + } conn, err := p.createConnection(ctx, serverName, serverConfig) if err != nil { return nil, fmt.Errorf("failed to create connection for %s: %w", serverName, err) @@ -198,7 +222,9 @@ func (p *MCPConnectionPool) createConnection(ctx context.Context, serverName str lastError: nil, } - fmt.Printf("✅ [POOL] Created connection for %s\n", serverName) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Created connection for %s", serverName)) + } return conn, nil } @@ -349,7 +375,9 @@ func (p *MCPConnectionPool) initializeClient(ctx context.Context, client client. return fmt.Errorf("initialization timeout or failed: %v", err) } - fmt.Printf("✅ [POOL] Initialized MCP client\n") + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Initialized MCP client")) + } return nil } @@ -412,10 +440,14 @@ func (p *MCPConnectionPool) HandleConnectionError(serverName string, err error) if isConnectionError(err) { conn.isHealthy = false - fmt.Printf("❌ [POOL] Connection %s marked as unhealthy: %v\n", serverName, err) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Connection %s unhealthy, removing", serverName)) + } if strings.Contains(err.Error(), "404") { - fmt.Printf("🔄 [POOL] 404 error for %s, will recreate on next request\n", serverName) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] 404 error for %s, will recreate on next request", serverName)) + } } } } @@ -466,11 +498,15 @@ func (p *MCPConnectionPool) Close() error { for name, conn := range p.connections { if err := conn.client.Close(); err != nil { - fmt.Printf("⚠️ [POOL] Failed to close connection %s: %v\n", name, err) + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug(fmt.Sprintf("[POOL] Failed to close connection %s: %v", name, err)) + } } } - fmt.Printf("🛑 [POOL] Connection pool closed\n") + if p.debugLogger != nil && p.debugLogger.IsDebugEnabled() { + p.debugLogger.LogDebug("[POOL] Connection pool closed") + } return nil } diff --git a/internal/tools/debug_logger.go b/internal/tools/debug_logger.go new file mode 100644 index 00000000..9df5767a --- /dev/null +++ b/internal/tools/debug_logger.go @@ -0,0 +1,28 @@ +package tools + +// DebugLogger interface for debug logging +type DebugLogger interface { + LogDebug(message string) + IsDebugEnabled() bool +} + +// SimpleDebugLogger is a simple implementation that prints to stdout +type SimpleDebugLogger struct { + enabled bool +} + +// NewSimpleDebugLogger creates a new simple debug logger +func NewSimpleDebugLogger(enabled bool) *SimpleDebugLogger { + return &SimpleDebugLogger{enabled: enabled} +} + +// LogDebug logs a debug message +func (l *SimpleDebugLogger) LogDebug(message string) { + // Silent by default - messages will only appear when using CLI debug logger + // This prevents duplicate or unstyled debug output during initialization +} + +// IsDebugEnabled returns whether debug logging is enabled +func (l *SimpleDebugLogger) IsDebugEnabled() bool { + return l.enabled +} diff --git a/internal/tools/mcp.go b/internal/tools/mcp.go index 2a02130b..39d84be6 100644 --- a/internal/tools/mcp.go +++ b/internal/tools/mcp.go @@ -26,6 +26,8 @@ type MCPToolManager struct { toolMap map[string]*toolMapping // maps prefixed tool names to their server and original name model model.ToolCallingChatModel // LLM model for sampling config *config.Config + debug bool + debugLogger DebugLogger } // toolMapping stores the mapping between prefixed tool names and their original details @@ -55,6 +57,14 @@ func (m *MCPToolManager) SetModel(model model.ToolCallingChatModel) { m.model = model } +// SetDebugLogger sets the debug logger +func (m *MCPToolManager) SetDebugLogger(logger DebugLogger) { + m.debugLogger = logger + if m.connectionPool != nil { + m.connectionPool.SetDebugLogger(logger) + } +} + // samplingHandler implements the MCP sampling handler interface type samplingHandler struct { model model.ToolCallingChatModel @@ -120,7 +130,12 @@ func (h *samplingHandler) CreateMessage(ctx context.Context, request mcp.CreateM func (m *MCPToolManager) LoadTools(ctx context.Context, config *config.Config) error { // Initialize connection pool m.config = config - m.connectionPool = NewMCPConnectionPool(DefaultConnectionPoolConfig(), m.model) + m.debug = config.Debug + if m.debugLogger == nil { + m.debugLogger = NewSimpleDebugLogger(config.Debug) + } + m.connectionPool = NewMCPConnectionPool(DefaultConnectionPoolConfig(), m.model, config.Debug) + m.connectionPool.SetDebugLogger(m.debugLogger) var loadErrors []string @@ -143,7 +158,7 @@ func (m *MCPToolManager) LoadTools(ctx context.Context, config *config.Config) e // loadServerTools loads tools from a single MCP server func (m *MCPToolManager) loadServerTools(ctx context.Context, serverName string, serverConfig config.MCPServerConfig) error { // Add debug logging - debugLogConnectionInfo(serverName, serverConfig) + m.debugLogConnectionInfo(serverName, serverConfig) // Get connection from pool conn, err := m.connectionPool.GetConnection(ctx, serverName, serverConfig) @@ -485,22 +500,26 @@ func (m *MCPToolManager) createBuiltinClient(ctx context.Context, serverName str } // debugLogConnectionInfo logs detailed connection information for debugging -func debugLogConnectionInfo(serverName string, serverConfig config.MCPServerConfig) { - fmt.Printf("🔍 [DEBUG] Connecting to MCP server: %s\n", serverName) - fmt.Printf("🔍 [DEBUG] Transport type: %s\n", serverConfig.GetTransportType()) +func (m *MCPToolManager) debugLogConnectionInfo(serverName string, serverConfig config.MCPServerConfig) { + if m.debugLogger == nil || !m.debugLogger.IsDebugEnabled() { + return + } + + m.debugLogger.LogDebug(fmt.Sprintf("[DEBUG] Connecting to MCP server: %s", serverName)) + m.debugLogger.LogDebug(fmt.Sprintf("[DEBUG] Transport type: %s", serverConfig.GetTransportType())) switch serverConfig.GetTransportType() { case "stdio": if len(serverConfig.Command) > 0 { - fmt.Printf("🔍 [DEBUG] Command: %s %v\n", serverConfig.Command[0], serverConfig.Command[1:]) + m.debugLogger.LogDebug(fmt.Sprintf("[DEBUG] Command: %s %v", serverConfig.Command[0], serverConfig.Command[1:])) } if len(serverConfig.Environment) > 0 { - fmt.Printf("🔍 [DEBUG] Environment variables: %d\n", len(serverConfig.Environment)) + m.debugLogger.LogDebug(fmt.Sprintf("[DEBUG] Environment variables: %d", len(serverConfig.Environment))) } case "sse", "streamable": - fmt.Printf("🔍 [DEBUG] URL: %s\n", serverConfig.URL) + m.debugLogger.LogDebug(fmt.Sprintf("[DEBUG] URL: %s", serverConfig.URL)) if len(serverConfig.Headers) > 0 { - fmt.Printf("🔍 [DEBUG] Headers: %v\n", serverConfig.Headers) + m.debugLogger.LogDebug(fmt.Sprintf("[DEBUG] Headers: %v", serverConfig.Headers)) } } } diff --git a/internal/ui/cli.go b/internal/ui/cli.go index 26efe735..4eacd6b3 100644 --- a/internal/ui/cli.go +++ b/internal/ui/cli.go @@ -26,6 +26,7 @@ type CLI struct { width int height int compactMode bool // Add compact mode flag + debug bool // Add debug mode flag modelName string // Store current model name lastStreamHeight int // track how far back we need to move the cursor to overwrite streaming messages usageDisplayed bool // track if usage info was displayed after last assistant message @@ -35,6 +36,7 @@ type CLI struct { func NewCLI(debug bool, compact bool) (*CLI, error) { cli := &CLI{ compactMode: compact, + debug: debug, } cli.updateSize() cli.messageRenderer = NewMessageRenderer(cli.width, debug) @@ -52,6 +54,11 @@ func (c *CLI) SetUsageTracker(tracker *UsageTracker) { } } +// GetDebugLogger returns a debug logger that uses the CLI for rendering +func (c *CLI) GetDebugLogger() *CLIDebugLogger { + return NewCLIDebugLogger(c) +} + // SetModelName sets the current model name for the CLI func (c *CLI) SetModelName(modelName string) { c.modelName = modelName @@ -232,6 +239,21 @@ func (c *CLI) DisplayCancellation() { c.displayContainer() } +// DisplayDebugMessage displays debug messages using the appropriate renderer +func (c *CLI) DisplayDebugMessage(message string) { + if !c.debug { + return + } + var msg UIMessage + if c.compactMode { + msg = c.compactRenderer.RenderDebugMessage(message, time.Now()) + } else { + msg = c.messageRenderer.RenderDebugMessage(message, time.Now()) + } + c.messageContainer.AddMessage(msg) + c.displayContainer() +} + // DisplayDebugConfig displays configuration settings using the appropriate renderer func (c *CLI) DisplayDebugConfig(config map[string]any) { var msg UIMessage diff --git a/internal/ui/compact_renderer.go b/internal/ui/compact_renderer.go index f71b95d5..b394a232 100644 --- a/internal/ui/compact_renderer.go +++ b/internal/ui/compact_renderer.go @@ -201,6 +201,28 @@ func (r *CompactRenderer) RenderErrorMessage(errorMsg string, timestamp time.Tim } } +// RenderDebugMessage renders debug messages in compact format +func (r *CompactRenderer) RenderDebugMessage(message string, timestamp time.Time) UIMessage { + theme := getTheme() + symbol := lipgloss.NewStyle().Foreground(theme.Tool).Render("*") + label := lipgloss.NewStyle().Foreground(theme.Tool).Bold(true).Render("Debug") + + // Truncate message if too long + content := message + if len(content) > r.width-20 { + content = content[:r.width-23] + "..." + } + + line := fmt.Sprintf("%s %-8s %s", symbol, label, content) + + return UIMessage{ + Type: SystemMessage, + Content: line, + Height: 1, + Timestamp: timestamp, + } +} + // RenderDebugConfigMessage renders debug config in compact format func (r *CompactRenderer) RenderDebugConfigMessage(config map[string]any, timestamp time.Time) UIMessage { theme := getTheme() diff --git a/internal/ui/debug_logger.go b/internal/ui/debug_logger.go new file mode 100644 index 00000000..f9fc52b2 --- /dev/null +++ b/internal/ui/debug_logger.go @@ -0,0 +1,76 @@ +package ui + +import ( + "fmt" + "strings" + "time" +) + +// CLIDebugLogger implements the tools.DebugLogger interface using CLI rendering +type CLIDebugLogger struct { + cli *CLI +} + +// NewCLIDebugLogger creates a new CLI debug logger +func NewCLIDebugLogger(cli *CLI) *CLIDebugLogger { + return &CLIDebugLogger{cli: cli} +} + +// LogDebug logs a debug message using the CLI's debug message renderer +func (l *CLIDebugLogger) LogDebug(message string) { + if l.cli == nil || !l.cli.debug { + return + } + + // Format the message to include all the debug info in a structured way + var formattedMessage string + + // Check if this is a multi-line debug output (like connection info) + if strings.Contains(message, "[DEBUG]") || strings.Contains(message, "[POOL]") { + // Extract the tag and content + if strings.HasPrefix(message, "[DEBUG]") { + content := strings.TrimPrefix(message, "[DEBUG]") + content = strings.TrimSpace(content) + formattedMessage = fmt.Sprintf("🔍 DEBUG: %s", content) + } else if strings.HasPrefix(message, "[POOL]") { + content := strings.TrimPrefix(message, "[POOL]") + content = strings.TrimSpace(content) + + // Add appropriate emoji based on the message content + if strings.Contains(content, "Creating new connection") { + formattedMessage = fmt.Sprintf("🆕 POOL: %s", content) + } else if strings.Contains(content, "Created connection") || strings.Contains(content, "Initialized") { + formattedMessage = fmt.Sprintf("✅ POOL: %s", content) + } else if strings.Contains(content, "Reusing") { + formattedMessage = fmt.Sprintf("🔄 POOL: %s", content) + } else if strings.Contains(content, "unhealthy") || strings.Contains(content, "failed") { + formattedMessage = fmt.Sprintf("❌ POOL: %s", content) + } else if strings.Contains(content, "closed") { + formattedMessage = fmt.Sprintf("🛑 POOL: %s", content) + } else if strings.Contains(content, "Failed to close") { + formattedMessage = fmt.Sprintf("⚠️ POOL: %s", content) + } else { + formattedMessage = fmt.Sprintf("🔍 POOL: %s", content) + } + } else { + formattedMessage = message + } + } else { + formattedMessage = message + } + + // Use the CLI's debug message rendering + var msg UIMessage + if l.cli.compactMode { + msg = l.cli.compactRenderer.RenderDebugMessage(formattedMessage, time.Now()) + } else { + msg = l.cli.messageRenderer.RenderDebugMessage(formattedMessage, time.Now()) + } + l.cli.messageContainer.AddMessage(msg) + l.cli.displayContainer() +} + +// IsDebugEnabled returns whether debug logging is enabled +func (l *CLIDebugLogger) IsDebugEnabled() bool { + return l.cli != nil && l.cli.debug +} diff --git a/internal/ui/messages.go b/internal/ui/messages.go index 7685cc90..ed4abdfd 100644 --- a/internal/ui/messages.go +++ b/internal/ui/messages.go @@ -193,6 +193,64 @@ func (r *MessageRenderer) RenderSystemMessage(content string, timestamp time.Tim } } +// RenderDebugMessage renders debug messages with tool response block styling +func (r *MessageRenderer) RenderDebugMessage(message string, timestamp time.Time) UIMessage { + baseStyle := lipgloss.NewStyle() + + // Create the main message style with border using tool color + theme := getTheme() + style := baseStyle. + Width(r.width - 3). // Account for left margin + BorderLeft(true). + Foreground(theme.Muted). + BorderForeground(theme.Tool). + BorderStyle(lipgloss.ThickBorder()). + PaddingLeft(1). + MarginLeft(2). // Add left margin like other messages + MarginBottom(1) // Add bottom margin + + // Format timestamp + timeStr := timestamp.Local().Format("02 Jan 2006 03:04 PM") + + // Create header with debug icon + header := baseStyle. + Foreground(theme.Tool). + Bold(true). + Render("🔍 Debug Output") + + // Process and format the message content + // Split into lines and format each one + lines := strings.Split(message, "\n") + var formattedLines []string + for _, line := range lines { + if strings.TrimSpace(line) != "" { + formattedLines = append(formattedLines, " "+line) + } + } + + content := baseStyle. + Foreground(theme.Muted). + Render(strings.Join(formattedLines, "\n")) + + // Create info line + info := baseStyle. + Width(r.width - 5). // Account for margins and padding + Foreground(theme.Muted). + Render(fmt.Sprintf(" MCPHost (%s)", timeStr)) + + // Combine all parts + fullContent := lipgloss.JoinVertical(lipgloss.Left, + header, + content, + info, + ) + + return UIMessage{ + Content: style.Render(fullContent), + Height: lipgloss.Height(style.Render(fullContent)), + } +} + // RenderDebugConfigMessage renders debug configuration settings with tool response block styling func (r *MessageRenderer) RenderDebugConfigMessage(config map[string]any, timestamp time.Time) UIMessage { baseStyle := lipgloss.NewStyle()