Repository navigation
feat: add teamorouter provider - #742
Open
2867297362mjb-sketch wants to merge 1 commit into
Open
2867297362mjb-sketch wants to merge 1 commit into
2867297362mjb-sketch wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.completionsathttps://api.teamorouter.com/v1. Every model listed here, Claude included, is served on chat completions.anthropic,openai,gemini,deepseek,zai,moonshot; Qwen fromopencode-zen). Context windows use the smaller of that entry and our public price list, so Qwen3.8 Max stays at 262,144.list_costfield 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).default_headerssendsX-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/v1suffix 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 addsteamorouterto that case.Testing:
go run ./cmd/formatleaves the file unchanged.go vet ./...andgo test ./...pass.CATWALK_URL=http://localhost:8080) in a clean environment with onlyTEAMOROUTER_API_KEYset. Results:crush run -m teamorouter/<model> "Read the file hello.txt ..."returned the file's exact contents fordeepseek-v4-flash,claude-sonnet-5-5andkimi-k3.--reasoning-effort highonclaude-sonnet-5-5answered correctly./v1/chat/completionstaggedcrush-teamorouter.🤖 Generated with Claude Code