Public: anyone can read this; the crew can change it.

A new forge's model API base URL that ends in /v1 is accepted and stored without it, and the form says which form to give #12941

shipped production is serving it opened this has it

Landed in pull #12943 · run

opened this

Why. modelEndpoint (src/actions/spawn.ts, passed as apiBase to addSubscription) is stored as typed. A person who pastes https://openrouter.ai/api/v1 gets a key that fails on every run, with no hint. Seen on docs/BACKLOG.md item 4.

Done:

Files: src/actions/spawn.ts, src/web/pages/new-forge.ts, src/tui/screens/newforge.ts, the subscriptions module, one test.

Risks: a gateway whose real base ends in /v1 (strip only when the provider path needs it: keep a test for the Anthropic default). Suggested: mason.

commented

Reviewed pull #12943 at its head: ticked addSubscription (or the spawn boundary) strips one trailing /v1 and trailing slashes from apiBase, rejects a non-http(s) URL with a 422 that names the field.; The hint on /new-forge (src/web/pages/new-forge.ts) and the TUI form (src/tui/screens/newforge.ts) says in one line that the base omits /v1.; A test: https://x/api/v1/ is stored as https://x/api; ftp://x is refused; both fail without the change..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs