Skip to content

Route Quick to DeepSeek on Maple and make Chat Completions paid-only - #1437

Merged
AnthonyRonning merged 4 commits into
masterfrom
codex-rt-quick-maple
Nov 3, 2026
Merged

AnthonyRonning merged 4 commits into
masterfrom
codex-rt-quick-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Router V2 and plan-policy changes for Quick, plus closing Chat Completions to Free accounts.

Routing and catalog (services/opensecret)

  • auto:quick resolves to DeepSeek V4.1 Flash on Free and Paid, and DeepSeek is now Free-tier.
  • Paid Quick's only alternate is GLM 5.3 Flash on Continuum. It is used only once every DeepSeek route (Maple i01 and Tinfoil) is unavailable. Free Quick has no alternate (intended: it already has the Maple → Tinfoil same-model fallback).
  • Stock DeepSeek account buckets split 99% Maple i01 / 1% Tinfoil (70×10 : 100×693). The 1% keeps live traffic and probes on the Tinfoil route so its health/circuit state stays current. Sticky routes and health gates keep their normal precedence, so existing accounts move as their memory expires.
  • GPT-OSS 120B, GPT-OSS Safeguard and Llama 3.3 are Pro. GPT-OSS and Llama stay in the chat catalog for paid plans and are hidden from the Free catalog (paid_catalog_only); both stay in /v1/models for paid API callers and already-installed agents that still request Llama for titles. Safeguard stays API-only.
  • Policy versions bumped: routing-v2-maple-instances-v7, auto-model-v3.
  • QUICK_MODEL_ID now names the Quick tier's target; the GPT-OSS ID is GPT_OSS_120B_MODEL_ID.

Chat Completions is paid-only

  • /v1/chat/completions refuses Free callers with the existing model_not_available_on_plan (403), which the agent and Research already present as an upgrade prompt.
  • When billing cannot confirm the plan (not configured, error, timeout), it returns a retryable 503 rather than falling back to free access. Body validation (missing model → 400) still runs first.
  • System One keeps its own shared entitlement and is unchanged.

Clients

  • Maple Agent: titles and tool/thinking summaries ask auto:quick with thinking off. On a GLM Flash fallback the backend clamps none to low; a 15-token title may then come back empty and the prompt-derived title is used.
  • Conversation titles ask auto:quick on the account's own plan instead of a hardcoded Llama request on the Free plan. They take the same Auto stage and Router V2 path as Quick chat: paid titles fall back to GLM 5.3 Flash, Free titles have no fallback. A chosen model that loses its routes or first-send claim before any send gets one further decision without it, matching Chat Completions. The body is built for the chosen model with the least reasoning it accepts (none on DeepSeek, low on GLM Flash).
  • Research: the offline alias fallback for Quick points at DeepSeek.
  • SDK integration tests: chat default deepseek-v4-1-flash, reasoning default kimi-k3 (kimi-k2-5 is retired), TTS default voxtral-tts, and the API-key model-list check looks for the Quick model. Live Chat Completions tests now need a paid account.

Behavior notes for review

  • Maple Agent sends its model traffic through Chat Completions, so it is paid-only. This was already true in practice, because every agent model was Pro before this change. DeepSeek is now access: "free" in the catalog, so a Free agent user can pick it and will get the upgrade error.
  • Local stacks without a billing service now get 503 from Chat Completions.
  • Older installed Research builds that used Chat Completions for Free-user helpers would now be refused.

Validation

  • services/opensecret: cargo fmt --check, cargo clippy --all-targets --locked -D warnings, cargo test --bins --locked → 1096 passed, 55 ignored. New/rewritten tests cover the Maple → Tinfoil → Continuum Flash → reject chain, the 1/99 bucket split, the plan gates, the Chat Completions gate, the per-plan catalog, and title model selection, fallback and re-decision.
  • apps/maple-agent: cargo test -p maple-agent --locked → 793 passed; just ci-lint passed.
  • sdk: Rust cargo fmt --check and cargo test --tests --no-run; Prettier check on the changed TS tests.
  • The pre-commit hook passed for sdk_ts, sdk_rust, research_frontend and opensecret. The Agent component was run separately (above). Its full ci-test fails on this macOS 27.2 host in the untouched maple-agent-updater test reads_native_release_tar_format_and_preserves_bundle_modes (host bsdtar 3.5.3 writes archive metadata the scanner rejects), independent of this diff.
  • Local smoke (mde workspace with local billing and Free/Pro fixtures, real Maple, Tinfoil and Continuum providers, Research web):
    • Free: auto:quick and DeepSeek served over Responses; gpt-oss-120b and llama3-3-70b → 403; Chat Completions → 403 model_not_available_on_plan. The picker does not list GPT-OSS or Llama. A UI chat on Quick worked and got a generated title.
    • Pro: auto:quick, DeepSeek, GPT-OSS and Llama served over Responses; auto:quick and Safeguard served over Chat Completions. The picker lists GPT-OSS and Llama, and a UI chat on GPT-OSS worked with a title generated through auto:quick.
    • Every logged DeepSeek request served by maple-i01.
    • Backend logs show titles on both plans taking the Auto stage (selector=auto:quick, surface=Internal) and pinning through Router V2 to maple-i01.
    • The smoke caught a regression fixed here: title generation was pinned to Llama on the Free plan for every account.
  • Not run: os-sdk-e2e lane locally, live Maple → Tinfoil → Flash failover and a live title on GLM Flash (unit tests only), a request in the 1% Tinfoil bucket, Maple Agent, usage/credit consumption, local flags (Research used hosted Dev flags), deployed behavior.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

- DeepSeek V4.1 Flash is the auto:quick target on Free and Paid and is now
  Free-tier. Paid Quick falls back to GLM 5.3 Flash (Continuum) only after
  every DeepSeek route is unavailable; Free Quick has no fallback.
- Stock DeepSeek account buckets split 99% Maple i01 / 1% Tinfoil, keeping
  live traffic on the Tinfoil route for health and circuit state.
- GPT-OSS 120B, GPT-OSS Safeguard and Llama 3.3 move to Pro; GPT-OSS and
  Llama leave the chat catalog but stay in the API for released clients.
- /v1/chat/completions refuses Free callers with model_not_available_on_plan
  and returns 503 when billing cannot confirm the plan. System One keeps its
  own entitlement.
- Maple Agent titles and summaries ask auto:quick with thinking off.
- SDK integration defaults move off retired and Pro-only models.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Maple development preview: https://2d875c86.maple-ca8.pages.dev

Commit: a4d211fa4a18886e1f4b9274b3005a4446a0faf6

Uses development API, billing, flags and PCR configuration. Cloudflare Access applies.

Title generation was pinned to Llama 3.3 on the Free plan for every
account, so moving Llama to Pro left all new conversations untitled.
Titles now use the Quick model, which every plan may use, with reasoning
off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- GPT-OSS 120B and Llama 3.3 return to the chat catalog for paid plans.
  They stay hidden from the Free catalog and refused on Free.
- Titles ask auto:quick on the account's own plan, so they take the Auto
  model stage: paid titles reach GLM 5.3 Flash once every DeepSeek route
  is out, and Free keeps its single target.
- The title request is built for the chosen model with the least reasoning
  it accepts, through the shared request policy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A title whose chosen model loses its routes or first-send claim now decides
once more without that model, matching Chat Completions. Both failures
precede any provider attempt, so nothing is replayed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AnthonyRonning
AnthonyRonning merged commit b4030a2 into master Nov 3, 2026
30 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-rt-quick-maple branch November 3, 2026 22:49

This branch was successfully deployed

1 active deployment
pages-pr-1437 — a4d211fa Deployed Nov 3, 2026 by github-actions[bot]
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