Repository navigation
Add codex and xai-oauth to the credential catalog and adapter contract - #689
Merged
Merged
Conversation
Both providers authenticate only through a loopback OAuth login (no API-key path), speak the OpenAI Responses protocol, and therefore ride the new openai-responses adapter plugin id end to end: credential-test provider entries, connector descriptors under a new oauth-loopback auth kind, catalog seeds, and the effective-list display names. Codex's config is deliberately probeless — it publishes no live model catalog and has no free auth-check endpoint, so the token exchange that mints the credential is the only proof. seedCatalog now rejects placeholderCredential for these OAuth-only ids with a named PlaceholderCredentialError: a fake secret could never authenticate and would only make the offering look launchable. Codex's offerings carry the host-identity quirks bag its adapter refuses to default.
packages/folded-runs/src/launch.ts no longer exists, and the launch-time provider rewrite it described is gone with it: the launched InferenceSource.provider is resolved straight from the catalog provider row's plugin column at serving time, in vendor/intx/db/src/model-source-resolution.ts's buildSource. Cite that live dispatch site instead.
The card list is pinned to supportedCredentialProviders, which now includes codex and xai-oauth; neither can have a key-paste card until the loopback OAuth login is wired, so the pin excludes exactly those two ids. Also applies the formatter to the new connector descriptors and their tests.
CreateModelProvider and the model_provider.plugin column both rejected the plugin id the codex/xai-oauth seeds carry, so a real-token seedCatalog would 400 at create time and parseModelProviderRow would throw on read. Recorded as a local delta on the vendor/intx/types and vendor/intx/db rows (VENDORED.md delta notes, kill-date tree hashes). The contract test drives the real validator and the real row parser, not the seedCatalog fake API that accepts everything.
The oauth start/callback routes redirect any descriptor carrying an oauth config, so codex/xai-oauth would send a browser to their consent pages with a localhost redirect_uri — a dead-end consent — and /oauth-configured reported them as configured. Both routes now refuse oauth-loopback descriptors with a typed loopback_connector error and the configured report omits them; these providers connect through the sidecar lane instead. Also pins the codex descriptor's authorize scope to the upstream CODEX_SCOPES list (including api.connectors.read/ invoke) and drops the probeless config's dead isKeyRejected stub; the xai-oauth probe comment no longer claims live confirmation.
The DEFAULT_ADAPTER_MANIFEST gains codex -> createCodexResponsesAdapter and xai-oauth -> createXaiResponsesAdapter (workspace deps, hoisted at the root like @corbits/ollama-adapter so the vendored manifest loader can import them). Catalog provider rows keep the wire-format plugin "openai-responses"; the launch-resolution seam in @intx/db's buildSource — a recorded local delta on the vendor/intx/db row with its kill-date hash — rewrites only the launched InferenceSource.provider to the adapter registry key, the same correction withOllamaAdapterKey used to perform (the ollama entry in the rewrite table also makes the shipped ollama manifest key actually reachable). Also drops the conflicting noEmit from the ported provider packages' referenced tsconfigs.
The inline codex/xai-oauth literals duplicated values the ported provider packages now export and carried a stale 'until the packages land' comment; both descriptors now read the packages' constants subpath (new browser-safe export: constants.ts is pure data, so the web bundle can keep building — the exchange closures stay plain fetch because the oauth-core-backed exchange helpers are node-only). VENDORED.md's vendor/intx/db delta note now names both fields the launch seam rewrites (InferenceSource.provider and the credential material's providerKey).
Contributor
Author
|
Self-review ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codexandxai-oauthjoinSupportedCredentialProvider,PROVIDER_TEST_CONFIG,AdapterPluginId(newopenai-responses), the connector registry (newoauth-loopbackauth kind), the catalog seeds, and the inference effective list.xairemains the existing API-key provider, untouched.cli-chat-proxy.grok.comas a bearer GET.seedCatalogrejectsplaceholderCredential: truefor the OAuth-only ids with a namedPlaceholderCredentialError; api-key providers keep their seeded placeholder path.openai-responsesin both@intx/typesand the@intx/dbschema (recorded local deltas, kill-date hashes updated), so real-token seeds pass the live hub validators; a contract test drives the realCreateModelProvidervalidator and a parse-row round trip.oauth-loopbackwith a typed error and/oauth-configuredomits them — they connect through the sidecar-hosted lane.createCodexResponsesAdapterandcreateXaiResponsesAdapter; the launch-resolution seam rewrites only the launched source's provider (and material key) to the adapter registry key forollama/codex/xai-oauth— a recordedvendor/intx/dbdelta../constantssubpaths of the two provider packages, so the descriptor cannot drift from the adapter's refresh path; those subpaths are ruled into the browser-safe-subpaths check.Verification
bun run checkexits 0 (typecheck, lint, full test matrix, structural checks incl.check:killdatesandbrowser-safe-subpaths).bun test packages/connections packages/seeding packages/inference-settings templates: 595 pass / 0 fail.Closes CL-7510