| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- package config
- import (
- "github.com/charmbracelet/crush/internal/fur/provider"
- )
- // MockProviders returns a mock list of providers for testing.
- // This avoids making API calls during tests and provides consistent test data.
- // Simplified version with only default models from each provider.
- func MockProviders() []provider.Provider {
- return []provider.Provider{
- {
- Name: "Anthropic",
- ID: provider.InferenceProviderAnthropic,
- APIKey: "$ANTHROPIC_API_KEY",
- APIEndpoint: "$ANTHROPIC_API_ENDPOINT",
- Type: provider.TypeAnthropic,
- DefaultLargeModelID: "claude-sonnet-4-20250514",
- DefaultSmallModelID: "claude-3-5-haiku-20241022",
- Models: []provider.Model{
- {
- ID: "claude-sonnet-4-20250514",
- Name: "Claude Sonnet 4",
- CostPer1MIn: 3.0,
- CostPer1MOut: 15.0,
- CostPer1MInCached: 3.75,
- CostPer1MOutCached: 0.3,
- ContextWindow: 200000,
- DefaultMaxTokens: 50000,
- CanReason: true,
- SupportsImages: true,
- },
- {
- ID: "claude-3-5-haiku-20241022",
- Name: "Claude 3.5 Haiku",
- CostPer1MIn: 0.8,
- CostPer1MOut: 4.0,
- CostPer1MInCached: 1.0,
- CostPer1MOutCached: 0.08,
- ContextWindow: 200000,
- DefaultMaxTokens: 5000,
- CanReason: false,
- SupportsImages: true,
- },
- },
- },
- {
- Name: "OpenAI",
- ID: provider.InferenceProviderOpenAI,
- APIKey: "$OPENAI_API_KEY",
- APIEndpoint: "$OPENAI_API_ENDPOINT",
- Type: provider.TypeOpenAI,
- DefaultLargeModelID: "codex-mini-latest",
- DefaultSmallModelID: "gpt-4o",
- Models: []provider.Model{
- {
- ID: "codex-mini-latest",
- Name: "Codex Mini",
- CostPer1MIn: 1.5,
- CostPer1MOut: 6.0,
- CostPer1MInCached: 0.0,
- CostPer1MOutCached: 0.375,
- ContextWindow: 200000,
- DefaultMaxTokens: 50000,
- CanReason: true,
- HasReasoningEffort: true,
- DefaultReasoningEffort: "medium",
- SupportsImages: true,
- },
- {
- ID: "gpt-4o",
- Name: "GPT-4o",
- CostPer1MIn: 2.5,
- CostPer1MOut: 10.0,
- CostPer1MInCached: 0.0,
- CostPer1MOutCached: 1.25,
- ContextWindow: 128000,
- DefaultMaxTokens: 20000,
- CanReason: false,
- SupportsImages: true,
- },
- },
- },
- {
- Name: "Google Gemini",
- ID: provider.InferenceProviderGemini,
- APIKey: "$GEMINI_API_KEY",
- APIEndpoint: "$GEMINI_API_ENDPOINT",
- Type: provider.TypeGemini,
- DefaultLargeModelID: "gemini-2.5-pro",
- DefaultSmallModelID: "gemini-2.5-flash",
- Models: []provider.Model{
- {
- ID: "gemini-2.5-pro",
- Name: "Gemini 2.5 Pro",
- CostPer1MIn: 1.25,
- CostPer1MOut: 10.0,
- CostPer1MInCached: 1.625,
- CostPer1MOutCached: 0.31,
- ContextWindow: 1048576,
- DefaultMaxTokens: 50000,
- CanReason: true,
- SupportsImages: true,
- },
- {
- ID: "gemini-2.5-flash",
- Name: "Gemini 2.5 Flash",
- CostPer1MIn: 0.3,
- CostPer1MOut: 2.5,
- CostPer1MInCached: 0.3833,
- CostPer1MOutCached: 0.075,
- ContextWindow: 1048576,
- DefaultMaxTokens: 50000,
- CanReason: true,
- SupportsImages: true,
- },
- },
- },
- {
- Name: "xAI",
- ID: provider.InferenceProviderXAI,
- APIKey: "$XAI_API_KEY",
- APIEndpoint: "https://api.x.ai/v1",
- Type: provider.TypeXAI,
- DefaultLargeModelID: "grok-3",
- DefaultSmallModelID: "grok-3-mini",
- Models: []provider.Model{
- {
- ID: "grok-3",
- Name: "Grok 3",
- CostPer1MIn: 3.0,
- CostPer1MOut: 15.0,
- CostPer1MInCached: 0.0,
- CostPer1MOutCached: 0.75,
- ContextWindow: 131072,
- DefaultMaxTokens: 20000,
- CanReason: false,
- SupportsImages: false,
- },
- {
- ID: "grok-3-mini",
- Name: "Grok 3 Mini",
- CostPer1MIn: 0.3,
- CostPer1MOut: 0.5,
- CostPer1MInCached: 0.0,
- CostPer1MOutCached: 0.075,
- ContextWindow: 131072,
- DefaultMaxTokens: 20000,
- CanReason: true,
- SupportsImages: false,
- },
- },
- },
- {
- Name: "Azure OpenAI",
- ID: provider.InferenceProviderAzure,
- APIKey: "$AZURE_OPENAI_API_KEY",
- APIEndpoint: "$AZURE_OPENAI_API_ENDPOINT",
- Type: provider.TypeAzure,
- DefaultLargeModelID: "o4-mini",
- DefaultSmallModelID: "gpt-4o",
- Models: []provider.Model{
- {
- ID: "o4-mini",
- Name: "o4 Mini",
- CostPer1MIn: 1.1,
- CostPer1MOut: 4.4,
- CostPer1MInCached: 0.0,
- CostPer1MOutCached: 0.275,
- ContextWindow: 200000,
- DefaultMaxTokens: 50000,
- CanReason: true,
- HasReasoningEffort: false,
- DefaultReasoningEffort: "medium",
- SupportsImages: true,
- },
- {
- ID: "gpt-4o",
- Name: "GPT-4o",
- CostPer1MIn: 2.5,
- CostPer1MOut: 10.0,
- CostPer1MInCached: 0.0,
- CostPer1MOutCached: 1.25,
- ContextWindow: 128000,
- DefaultMaxTokens: 20000,
- CanReason: false,
- SupportsImages: true,
- },
- },
- },
- {
- Name: "AWS Bedrock",
- ID: provider.InferenceProviderBedrock,
- Type: provider.TypeBedrock,
- DefaultLargeModelID: "anthropic.claude-sonnet-4-20250514-v1:0",
- DefaultSmallModelID: "anthropic.claude-3-5-haiku-20241022-v1:0",
- Models: []provider.Model{
- {
- ID: "anthropic.claude-sonnet-4-20250514-v1:0",
- Name: "AWS Claude Sonnet 4",
- CostPer1MIn: 3.0,
- CostPer1MOut: 15.0,
- CostPer1MInCached: 3.75,
- CostPer1MOutCached: 0.3,
- ContextWindow: 200000,
- DefaultMaxTokens: 50000,
- CanReason: true,
- SupportsImages: true,
- },
- {
- ID: "anthropic.claude-3-5-haiku-20241022-v1:0",
- Name: "AWS Claude 3.5 Haiku",
- CostPer1MIn: 0.8,
- CostPer1MOut: 4.0,
- CostPer1MInCached: 1.0,
- CostPer1MOutCached: 0.08,
- ContextWindow: 200000,
- DefaultMaxTokens: 50000,
- CanReason: false,
- SupportsImages: true,
- },
- },
- },
- {
- Name: "Google Vertex AI",
- ID: provider.InferenceProviderVertexAI,
- Type: provider.TypeVertexAI,
- DefaultLargeModelID: "gemini-2.5-pro",
- DefaultSmallModelID: "gemini-2.5-flash",
- Models: []provider.Model{
- {
- ID: "gemini-2.5-pro",
- Name: "Gemini 2.5 Pro",
- CostPer1MIn: 1.25,
- CostPer1MOut: 10.0,
- CostPer1MInCached: 1.625,
- CostPer1MOutCached: 0.31,
- ContextWindow: 1048576,
- DefaultMaxTokens: 50000,
- CanReason: true,
- SupportsImages: true,
- },
- {
- ID: "gemini-2.5-flash",
- Name: "Gemini 2.5 Flash",
- CostPer1MIn: 0.3,
- CostPer1MOut: 2.5,
- CostPer1MInCached: 0.3833,
- CostPer1MOutCached: 0.075,
- ContextWindow: 1048576,
- DefaultMaxTokens: 50000,
- CanReason: true,
- SupportsImages: true,
- },
- },
- },
- {
- Name: "OpenRouter",
- ID: provider.InferenceProviderOpenRouter,
- APIKey: "$OPENROUTER_API_KEY",
- APIEndpoint: "https://openrouter.ai/api/v1",
- Type: provider.TypeOpenAI,
- DefaultLargeModelID: "anthropic/claude-sonnet-4",
- DefaultSmallModelID: "anthropic/claude-haiku-3.5",
- Models: []provider.Model{
- {
- ID: "anthropic/claude-sonnet-4",
- Name: "Anthropic: Claude Sonnet 4",
- CostPer1MIn: 3.0,
- CostPer1MOut: 15.0,
- CostPer1MInCached: 3.75,
- CostPer1MOutCached: 0.3,
- ContextWindow: 200000,
- DefaultMaxTokens: 32000,
- CanReason: true,
- SupportsImages: true,
- },
- {
- ID: "anthropic/claude-haiku-3.5",
- Name: "Anthropic: Claude 3.5 Haiku",
- CostPer1MIn: 0.8,
- CostPer1MOut: 4.0,
- CostPer1MInCached: 1.0,
- CostPer1MOutCached: 0.08,
- ContextWindow: 200000,
- DefaultMaxTokens: 4096,
- CanReason: false,
- SupportsImages: true,
- },
- },
- },
- }
- }
|