Provider class tables disagree, so OpenRouter can't reach the model proxy #2048

Closed
opened 2026-11-18 23:10:11 +00:00 by sam · 1 comment
Owner

classBaseURL (internal/infrastructure/egress/modelproxy.go) is the only source of a provider's upstream host when the provider sets no base_url. cloudProviders (internal/infrastructure/configuration/setup/step_provider.go) is what archie setup offers and writes. Nothing keeps the two in step: they name 20 classes between them.

archie setup --provider openrouter writes class = "openrouter" and no base URL, so egress.ProviderEndpoint fails with provider class "openrouter" needs a base_url and no model session is built, which leaves the provider unusable from a task container. Any class the wizard offers and the map doesn't name fails the same way, and provider settings accept a class with no base URL too.

Done when: one declaration names each provider class and its default base URL, the setup wizard is driven by it, and a provider configured with any class the wizard offers builds a model egress session.

`classBaseURL` (internal/infrastructure/egress/modelproxy.go) is the only source of a provider's upstream host when the provider sets no `base_url`. `cloudProviders` (internal/infrastructure/configuration/setup/step_provider.go) is what `archie setup` offers and writes. Nothing keeps the two in step: they name 20 classes between them. `archie setup --provider openrouter` writes `class = "openrouter"` and no base URL, so `egress.ProviderEndpoint` fails with `provider class "openrouter" needs a base_url` and no model session is built, which leaves the provider unusable from a task container. Any class the wizard offers and the map doesn't name fails the same way, and provider settings accept a class with no base URL too. Done when: one declaration names each provider class and its default base URL, the setup wizard is driven by it, and a provider configured with any class the wizard offers builds a model egress session.
sam added the highbugin-progress labels 2026-11-18 23:10:35 +00:00
Author
Owner

Cause: the wizard's table named a class (openrouter) that no ai-sdk class serves, and setup wrote no base_url, so egress could resolve no host for it and no model session was built.

Fix (32fbf8b69^..): the table carries the provider name, the class that serves it and the base URL where the class has none. OpenRouter is openai-compatible pointed at its own endpoint, and setup writes base_url. The CLI help is built from the same table.

Verified: a new test renders every offered provider through egress.ProviderEndpoint; on the old values it fails with provider class "openrouter" needs a base_url, on the new ones it passes. task check green.

Cause: the wizard's table named a class (`openrouter`) that no ai-sdk class serves, and setup wrote no `base_url`, so egress could resolve no host for it and no model session was built. Fix (32fbf8b69^..): the table carries the provider name, the class that serves it and the base URL where the class has none. OpenRouter is `openai-compatible` pointed at its own endpoint, and setup writes `base_url`. The CLI help is built from the same table. Verified: a new test renders every offered provider through `egress.ProviderEndpoint`; on the old values it fails with `provider class "openrouter" needs a base_url`, on the new ones it passes. task check green.
sam closed this issue 2026-11-21 03:51:38 +00:00
sam removed the in-progress label 2026-11-21 03:51:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#2048