Skip to content

Expand and verify provider presets #10

Description

@jellologic

Goal

Ship verified presets for every provider exposing an Anthropic-compatible /v1/messages endpoint. We currently have three (Anthropic, z.ai, OpenRouter) plus a custom escape hatch.

Ground rule

Every preset must be verified against primary sources, not blog posts. The research pass found widely-repeated claims that are simply false and actively break users. Each preset needs: exact base URL (paths differ — some bare host, some /anthropic, some /v1), which env var carries the credential, real model IDs, and confirmed tool-calling support.

Candidates

Verified so far:

ModelScopehttps://api-inference.modelscope.cn (bare host; the /v1 on the same doc page is the OpenAI route, a common mistake). Token keeps its ms- prefix — the widespread "strip the prefix" advice is wrong and breaks auth. 2,000 calls/day free, requires a real-name-verified Alibaba Cloud link. No prompt caching (verified: cache_control is silently discarded). Tool calling is per-model and undocumented; maintainer confirmed it does not work for deepseek-v3.1 or kimi-k2. Labeled beta, and ModelScope never documents Claude Code at all.

⚠️ Serious quirk: with stream: true (which Claude Code always uses), an invalid token or exhausted quota returns HTTP 200 with a silent empty reply rather than an error. Users will see a hang, not a message. If we ship this preset, doctor (#PLACEHOLDER_8) must probe non-streaming to get a real status code.

Rejected:

iFlow — a /v1/messages route provably exists on apis.iflow.cn but is entirely undocumented, unused publicly, and missing count_tokens. Decisive blocker: API keys expire after 7 days, which breaks any persisted config by design. Not worth a preset.

Still to assess (survey in flight): Moonshot/Kimi, DeepSeek, Groq, Cerebras, Together, Fireworks, Nebius, DeepInfra, local runners (Ollama / LM Studio / llama.cpp / vLLM), and gateways (LiteLLM, Portkey, Helicone, Cloudflare AI Gateway).

Separately: Bedrock, Vertex and Foundry are not base-URL providers. Claude Code has native support via CLAUDE_CODE_USE_BEDROCK / USE_VERTEX / USE_FOUNDRY, each with its own required vars (AWS_REGION, ANTHROPIC_VERTEX_PROJECT_ID, ANTHROPIC_FOUNDRY_RESOURCE) and provider-specific model IDs — Bedrock needs full inference-profile ARNs. These need a different preset shape and probably belong in their own issue.

Acceptance criteria

  • Each preset cites the primary source it was verified against
  • Each records: base URL, credential env var, model IDs, tool support, caching support, free-tier terms
  • Known-broken combinations are marked, not silently offered
  • Providers with disqualifying quirks are documented as rejected, with the reason
  • Presets carry a verifiedOn date so staleness is visible

Addendum — provider survey results (2026-07-21)

SiliconFlowhttps://api.siliconflow.com/ intl, https://api.siliconflow.cn/ CN. Bare host. Verified trap: https://api.siliconflow.com/v1 is the OpenAI URL and yields /v1/v1/messages → 404. Models zai-org/GLM-5.2, MiniMaxAI/MiniMax-M3; a Pro/ prefix marks the paid variant, unprefixed is free tier at 1,000 RPM. Docs say ANTHROPIC_API_KEY, but both headers work — prefer ANTHROPIC_AUTH_TOKEN, which avoids Claude Code's one-time interactive approval prompt for ANTHROPIC_API_KEY.

Volcengine / Doubao ARK — recommend skipping. Two products with non-interchangeable keys (/api/coding vs /api/plan; a /v3 suffix marks the OpenAI variant). Three reasons for caution:

  1. Probe could not confirm routing — ARK returns identical 401s on nonsense control paths, so this rests on docs alone unlike every other entry here.
  2. Pointing at /api/v3 silently bills pay-as-you-go instead of consuming plan quota.
  3. Docs reportedly warn that driving these endpoints from your own scripts may be flagged as abuse and lead to account suspension — and a launcher is exactly the "own script" shape. Shipping a preset that can get users banned is not worth the breadth.

iFlow — confirmed do-not-ship.

⚠️ Hold before finalising z.ai and DeepSeek

Two findings are still outstanding from the survey and both are likely to cause user-facing bugs:

  • A [1m] / auto-compact-window clamping interaction. Directly relevant to z.ai: glm-5.2[1m] needs CLAUDE_CODE_AUTO_COMPACT_WINDOW, but there may be a clamping floor that makes the naive value not behave as expected. This also affects Set context-window env vars from catalog data #2.
  • A DeepSeek role: "system" breakage.

Do not finalise either preset until these land.

Metadata

Metadata

Assignees

No one assigned

    Labels

    providerProvider presets and catalogs

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions