Commit Graph
3 Commits
Author SHA1 Message Date
dayuan.jiang 841efcfea2 test: record a private client URL in the provider behavior snapshot
A sixteenth override shape, a key with a private base URL, so the snapshot
holds usesServerEndpoint's answer for the server's own network before the
function changes. 252 rows added, none changed.
2026-10-12 21:17:51 +09:00
dayuan.jiang b0e95a5ef4 refactor(providers): one record per provider, ten name-keyed tables derived from it
Step 2 of the provider refactor plan. lib/providers.ts holds one record per
provider (SDK kind, credential kind, env prefix, default URL, picker group,
notes and base URL hints in four languages, and the short model list of the
six providers that cannot list models). ProviderName is now the record's
key set and lib/types/model-config.ts re-exports the record as PROVIDER_INFO,
so the twelve importers are unchanged.

Derived from the record, under their old names and in their old files:
FIXED_CRED_PROVIDERS, PROVIDER_LOGO_MAP and chatRequestUrl's own-path list
(model-config.ts), SINGLE_SYSTEM_PROVIDERS, PROVIDER_ENV_VARS and
SDK_KNOWS_ENDPOINT (ai-providers.ts), PROVIDER_GROUPS and OPTIONS_OPEN
(provider-setup.ts), NO_KEY_NEEDED (provider-models route).
tests/unit/providers.test.ts freezes the old tables' values and checks the
derived ones against them. The record is written in the picker's order, so
the provider lists in two 'No AI provider configured' messages change order;
those two snapshot rows are the only snapshot change.
2026-10-12 21:17:51 +09:00
dayuan.jiang 31f4641178 test: record the provider layer's behavior before the refactor
Step 0 of docs/plans/2026-10-provider-refactor.md. provider-matrix.test.ts
snapshots what getAIModel hands to each SDK factory, and what
usesServerCredentials, usesServerEndpoint, globalBaseUrl and chatRequestUrl
answer, for 24 providers, 15 client override shapes and 9 server
environments, plus auto-detection rows and model id probes (3879 rows).
provider-legacy.test.ts keeps a copy of the two quota functions and compares
them with the live ones over every input class (30720 and 288 combinations).
No production code changes.
2026-10-12 21:17:51 +09:00