Files
sam e70c27faf9 fix(configuration): one provider table, so OpenRouter gets an endpoint (#2048)
The provider step wrote class "openrouter", which no ai-sdk class serves and
which egress cannot resolve a host for, so a provider the wizard offered could
never build a model session. The table now names the class that serves each
provider and the base URL it needs where the class has no default, setup writes
base_url with it, and the flag help is built from the same list.
2026-11-21 03:48:28 +11:00

20 lines
657 B
Go

package setup
import (
"testing"
"github.com/samcharles93/archie-core/internal/infrastructure/egress"
)
// TestEveryOfferedProviderResolvesAsAModelEndpoint guards the drift that left
// OpenRouter selectable while nothing could build its endpoint: setup wrote a
// class with no base URL, so egress refused the provider and no model session
// existed for it.
func TestEveryOfferedProviderResolvesAsAModelEndpoint(t *testing.T) {
for _, cp := range cloudProviders {
if _, _, err := egress.ProviderEndpoint(cp.class, cp.baseURL); err != nil {
t.Errorf("%s (class %q, base URL %q) has no endpoint: %v", cp.name, cp.class, cp.baseURL, err)
}
}
}