Skip to content

Route every client through the hub: provider-only endpoints, Vibe and Antigravity, CI fixes - #2

Merged
rune-oai merged 1 commit into
mainfrom
update/through-the-hub
Nov 16, 2026
Merged

rune-oai merged 1 commit into
mainfrom
update/through-the-hub

Conversation

@rune-oai

Copy link
Copy Markdown
Owner

Every client should run through the hub. Two could not: the Antigravity CLI takes its whole model list from the endpoint it is pointed at, so pointing it at the hub would offer it Claude and Codex subscription models too; and Mistral Vibe draws on a separate allowance from a separate key. Two intermittent CI failures from the last update are also fixed at the root.

Changes

  • Provider-only endpoints. /provider/<name>/v1/... and /provider/<name>/v1beta/... pin a request to one provider's accounts and list only that provider's models, for the OpenAI, Claude and Gemini API shapes. The Antigravity CLI's gateway mode can then use a Google account through the hub with its full model list. A model outside the provider answers "model not found" and never falls through to another provider.
  • Mistral Vibe through the hub. The Vibe key goes on the hub as a second Mistral upstream with a vibe model prefix, so only Vibe spends the Vibe Code allowance. Keys of one Mistral customer are recorded as one account, so neither allowance is counted twice. docs/t3code.md has the setup.
  • Config-reload race (the intermittent Issue6559 failure). A config save truncates the file before writing; a reload that read it in between loaded an empty config, so management calls briefly answered 404. Required config loads now reject empty content and the watcher keeps the current config. A deterministic test forces that ordering.
  • Responses WebSocket. Upstream CLIProxyAPI's failover for requests refused before any output is back, with the race behind its flaky test fixed: a terminal error frame could be dropped by a contended lock or cut off by teardown. Failover also respects the hub's own rule: when the only account with allowance is on hold and the rest are spent, the client gets the short cooldown, not a spent account's multi-day refusal.

The /v0/management endpoints T3 Code reads are unchanged and pinned by test/t3code_contract_test.go.

Checks

make verify passes locally: all Go tests, build, and 2233 web tests. The two formerly intermittent tests passed 3,000 runs plus 300 race-detector runs each under CPU pressure (macOS arm64; not yet run on Ubuntu outside CI). Vibe through the hub was tested live: the Vibe Code allowance moved and the API allowance did not.

Created with Claude Fable 5.2 and Claude Opus 5.5 in Claude Code, with GPT-6.1 Sol subagents.

🤖 Generated with Claude Code

… Antigravity, CI fixes

Some clients take their whole model list from the endpoint they are pointed
at and must stay on one provider. `/provider/<name>/...` pins a request to
that provider's accounts and lists only its models, so the Antigravity CLI's
gateway mode can use a Google account through the hub without seeing Claude
or Codex subscription models.

- Provider-only endpoints for the OpenAI, Claude and Gemini APIs.
- Mistral keys of one customer (a console key and a Vibe key) are recorded as
  one account, so the API and Vibe Code budgets are not counted twice. Docs
  for running Mistral Vibe through the hub on its own key.
- Fixed a config-reload race: a save that truncated the file between two reads
  briefly loaded an empty config, so management calls answered 404. This was
  the intermittent CI failure.
- Responses WebSocket: requests refused before any output fail over to another
  account (taken from upstream CLIProxyAPI), a terminal error frame is no
  longer lost to a racing close, and failover waits for an account on hold
  rather than switching to one that is spent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rune-oai
rune-oai merged commit 17d883b into main Nov 16, 2026
6 checks passed
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