Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions internal/providers/configs/thegrid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"name": "The Grid",
"id": "thegrid",
"api_key": "$THEGRID_API_KEY",
"api_endpoint": "https://api.thegrid.ai/v1",
"type": "openai-compat",
"default_large_model_id": "agent-max",
"default_small_model_id": "text-standard",
"models": [
{
"id": "agent-max",
"name": "Agent Max",
"context_window": 1000000,
"default_max_tokens": 128000,
"cost_per_1m_in": 1.5885,
"cost_per_1m_out": 1.5885,
"cost_per_1m_in_cached": 1.5885,
"cost_per_1m_out_cached": 1.5885,
"can_reason": true,
"supports_attachments": true
},
{
"id": "agent-prime",
"name": "Agent Prime",
"context_window": 196608,
"default_max_tokens": 30000,
"cost_per_1m_in": 0.1422,
"cost_per_1m_out": 0.1422,
"cost_per_1m_in_cached": 0.1422,
"cost_per_1m_out_cached": 0.1422,
"can_reason": true,
"supports_attachments": false
},
{
"id": "agent-standard",
"name": "Agent Standard",
"context_window": 128000,
"default_max_tokens": 16000,
"cost_per_1m_in": 0.02,
"cost_per_1m_out": 0.02,
"cost_per_1m_in_cached": 0.02,
"cost_per_1m_out_cached": 0.02,
"can_reason": true,
"supports_attachments": false
},
{
"id": "code-max",
"name": "Code Max",
"context_window": 1000000,
"default_max_tokens": 128000,
"cost_per_1m_in": 1.7553,
"cost_per_1m_out": 1.7553,
"cost_per_1m_in_cached": 1.7553,
"cost_per_1m_out_cached": 1.7553,
"can_reason": true,
"supports_attachments": true
},
{
"id": "code-prime",
"name": "Code Prime",
"context_window": 196608,
"default_max_tokens": 30000,
"cost_per_1m_in": 0.1493,
"cost_per_1m_out": 0.1493,
"cost_per_1m_in_cached": 0.1493,
"cost_per_1m_out_cached": 0.1493,
"can_reason": true,
"supports_attachments": false
},
{
"id": "code-standard",
"name": "Code Standard",
"context_window": 128000,
"default_max_tokens": 16000,
"cost_per_1m_in": 0.0288,
"cost_per_1m_out": 0.0288,
"cost_per_1m_in_cached": 0.0288,
"cost_per_1m_out_cached": 0.0288,
"can_reason": true,
"supports_attachments": false
},
{
"id": "text-max",
"name": "Text Max",
"context_window": 1000000,
"default_max_tokens": 128000,
"cost_per_1m_in": 1.68,
"cost_per_1m_out": 1.68,
"cost_per_1m_in_cached": 1.68,
"cost_per_1m_out_cached": 1.68,
"can_reason": true,
"supports_attachments": true
},
{
"id": "text-prime",
"name": "Text Prime",
"context_window": 196608,
"default_max_tokens": 30000,
"cost_per_1m_in": 0.1017,
"cost_per_1m_out": 0.1017,
"cost_per_1m_in_cached": 0.1017,
"cost_per_1m_out_cached": 0.1017,
"can_reason": true,
"supports_attachments": false
},
{
"id": "text-standard",
"name": "Text Standard",
"context_window": 128000,
"default_max_tokens": 16000,
"cost_per_1m_in": 0.03,
"cost_per_1m_out": 0.03,
"cost_per_1m_in_cached": 0.03,
"cost_per_1m_out_cached": 0.03,
"can_reason": true,
"supports_attachments": false
}
]
}
8 changes: 8 additions & 0 deletions internal/providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ var scalewayConfig []byte
//go:embed configs/synthetic.json
var syntheticConfig []byte

//go:embed configs/thegrid.json
var theGridConfig []byte

//go:embed configs/vercel.json
var vercelConfig []byte

Expand Down Expand Up @@ -171,6 +174,7 @@ var providerRegistry = []ProviderFunc{
openRouterProvider,
qiniuCloudProvider,
scalewayProvider,
theGridProvider,
vercelProvider,
veniceProvider,
vertexAIProvider,
Expand Down Expand Up @@ -328,6 +332,10 @@ func syntheticProvider() catwalk.Provider {
return loadProviderFromConfig(syntheticConfig)
}

func theGridProvider() catwalk.Provider {
return loadProviderFromConfig(theGridConfig)
}

func vercelProvider() catwalk.Provider {
return loadProviderFromConfig(vercelConfig)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/catwalk/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const (
InferenceProviderBaseten InferenceProvider = "baseten"
InferenceProviderMoonshot InferenceProvider = "moonshot"
InferenceProviderAtlasCloud InferenceProvider = "atlascloud"
InferenceProviderTheGrid InferenceProvider = "thegrid"
)

// Provider represents an AI provider configuration.
Expand Down Expand Up @@ -140,6 +141,7 @@ func KnownProviders() []InferenceProvider {
InferenceProviderBaseten,
InferenceProviderMoonshot,
InferenceProviderAtlasCloud,
InferenceProviderTheGrid,
}
}

Expand Down