Skip to content

feat: add teamorouter provider - #742

Open
2867297362mjb-sketch wants to merge 1 commit into
charmbracelet:mainfrom
2867297362mjb-sketch:feat/teamorouter-provider
Open

2867297362mjb-sketch wants to merge 1 commit into
charmbracelet:mainfrom
2867297362mjb-sketch:feat/teamorouter-provider

Conversation

@2867297362mjb-sketch

Copy link
Copy Markdown

Adds TeamoRouter, a pay-as-you-go gateway, as provider teamorouter. With one key (TEAMOROUTER_API_KEY), Crush users can pick Claude, GPT, Gemini, DeepSeek, GLM, Kimi and Qwen models. I work at TeamoRouter.

  • Type: completions at https://api.teamorouter.com/v1. Every model listed here, Claude included, is served on chat completions.
  • Defaults: Claude Sonnet 5.5 is the large model and DeepSeek V4 Flash is the small one.
  • Models (12): Claude Opus/Sonnet/Haiku 5.5, GPT-5.5, GPT-5.4 mini, Gemini 3.8 Flash, DeepSeek V4 Pro/Flash, GLM-5.3, Kimi K3, Qwen3.8 Max/Flash.
  • Limits, reasoning, capabilities: copied from the existing first-party entries for the same ids (anthropic, openai, gemini, deepseek, zai, moonshot; Qwen from opencode-zen). Context windows use the smaller of that entry and our public price list, so Qwen3.8 Max stays at 262,144.
  • Prices: USD per 1M tokens, the labs' list prices as published in the list_cost field of that price list. It is the same convention as our models.dev entry (feat(teamorouter): add TeamoRouter provider (v2 schema, 10 models) anomalyco/models.dev#9817).
  • Header: default_headers sends X-Client-Source: crush-teamorouter, so we can see which traffic comes from Crush.

A note on Claude: TeamoRouter also serves Claude on the Anthropic Messages API at the API root (https://api.teamorouter.com/v1/messages). I tried "type": "messages" for the Claude models, but Crush only strips the /v1 suffix for the OpenCode gateways, so the request went to /v1/v1/messages. This PR therefore keeps Claude on completions, which works. If you'd prefer Messages, I can send a small Crush follow-up that adds teamorouter to that case.

Testing:

  • go run ./cmd/format leaves the file unchanged. go vet ./... and go test ./... pass.
  • I built this branch's server locally and pointed Crush v0.100.0 at it (CATWALK_URL=http://localhost:8080) in a clean environment with only TEAMOROUTER_API_KEY set. Results:
    • crush run -m teamorouter/<model> "Read the file hello.txt ..." returned the file's exact contents for deepseek-v4-flash, claude-sonnet-5-5 and kimi-k3.
    • --reasoning-effort high on claude-sonnet-5-5 answered correctly.
    • On our side, every request arrived on /v1/chat/completions tagged crush-teamorouter.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant