Repository navigation
refactor(config): built-in provider kinds and patches come from the table (ENG-1066) - #373
Conversation
…able (ENG-1066) ProviderKind's five built-in variants become ProviderKind::Builtin(row), and ProviderEntryPatch's become one Builtin patch parsed and serialised by the row's variant name and accepted fields (ADR-0064 §2). Model discovery reads the row's discovery shape instead of matching provider kinds. Trust digests of every patch shape are pinned to the bytes recorded before the change, now including LiteLLM, Bedrock, Mantle and Custom.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Slice AP7c, which finishes AP7 of the auth-providers plan (ENG-1066), after #368 and #372.
What changed
No user-visible change. Two things still had a variant per provider; they now come from the provider table:
ProviderKind: the five built-in variants becomeProviderKind::Builtin(BuiltinProvider), withname(),builtin()anddiscovery().qq configprintskind.name(), the same strings as before.ProviderEntryPatch: the five built-in variants become oneBuiltinpatch (ADR-0064 §2). Hand-written serde maps the row'sconfig_name(OpenAi,OpenAiCodex, …) to the row and accepts only the row'spatch_fields. Anything else is anunknown fielderror, as underdeny_unknown_fields. Serialisation writes the same externally tagged struct variant, field order and skipped fields as before. Other kinds keep a derived enum, replayed throughEnumAccess.ModelDiscoveryShape(Supplementary,Authoritative,Codex) instead of matchingOpenAiCodex | Anthropic. API-key headers and pagination follow the protocol, which is how every built-in already behaved.Each row now carries the RON variant name, accepted patch fields and discovery shape. Adding an API-key preset is one table row plus its
BuiltinCatalog(and docs and canary entries). There is no newProviderKindor patch variant, and no new match arm.Verification
builtin_provider_patches_keep_their_trust_digestsnow pins 13 documents: the 9 built-in shapes from refactor(config,cli): drive built-in HTTP providers from one table (ENG-1066) #368 plus LiteLLM, Bedrock, Mantle and Custom. The 4 new digests were recorded on unmodifiedorigin/mainbefore the change. All are byte-identical afterwards, so trusted project files stay trusted.builtin_provider_patches_reject_fields_they_do_not_haveandbuiltin_provider_patches_layer_over_their_presetspass unchanged, apart from comparingkind.name().every_row_has_a_unique_config_name_and_known_patch_fields.cargo xtask checkpassed;cargo xtask smoke9/9.Notes
kind.name()instead of the enum discriminant.cache_identity_separates_effective_credentialsused to tell API key from bearer only throughProviderKind::Anthropicon an OpenAI route. It now uses an Anthropic Messages route, where the header actually differs.xtask/src/legacy-sleeps.txt: 5 existing entries moved 12 lines; no new sleeps.