Skip to content

bug(platform): switching custom-provider model source shows removed model IDs that Save does not store #3664

Closed

Description

@yannickmonney

P2 · Reproduced locally at 44e0dcf254975286c0e9dea443b5cd1ca6b23347.

The model IDs visible at Save differ from the allowlist actually stored, so an administrator can unintentionally remove model access while the form still displays those IDs.

Reproduction:

  1. Edit a custom provider with Enter model IDs selected and two allowlisted IDs, alpha and beta.
  2. Switch Models to Discover from /models. Remove alpha from the model allowlist; leave beta.
  3. Switch back to Enter model IDs. Observe the text field.
  4. Save without typing in the model-ID field and inspect the stored allowlist.

Expected: After returning to manual entry, the text field must show beta, matching the current list that will be saved.

Observed: The text field still shows alpha, beta, but the real request and stored credential contain only beta.

Cause: ModelAllowlistField initializes independent text state from value once and keeps it when freeText changes. The selection branch updates value without synchronizing that text. ProviderExtraFields reuses the component when switching source modes.

Frozen observation/control output:

CONFIRMED manual alpha,beta -> discovery removes alpha -> manual textbox displays alpha,beta; Save sends/stores beta only

Control: The discovery UI correctly removes alpha and retains beta before the toggle; the real native API persists the submitted one-ID allowlist. The mismatch is between the returning manual field and its current controlled value.

Exact probe command (5/5 tests passed; cwd is the detached source services/platform directory):

/Users/yannick/.npm/_npx/22f2fe8d8bc13000/node_modules/.bin/bun x vitest run --config /Users/yannick/.codex/notes/tale-100-findings/provider-connector-proof/vitest.config.ts /Users/yannick/.codex/notes/tale-100-findings/provider-connector-proof/provider-boundaries.probe.test.tsx --maxWorkers 1 --testTimeout 30000 --reporter verbose --silent=false

Proof boundary: Executed the actual CredentialEditDialog, provider credential adapter, mutation hooks, HTTP adapters and native localhost:3076 API. Reads after writes used the real persisted config/DB. Only owned local provider/credential fixtures were used; env references carry no credential secret and catalog source remained none in persisted definitions. No model, external provider or OAuth request ran. The component harness supplies catalog/credential props and a query client; this is not a browser run.

Source:

Deduplication: Cached all-state issue #2679 concerns typing an ID without explicitly adding it in an older model editor. This current component parses on every change; the confirmed root is unsynchronized text state after changing source modes, with previously stored IDs. Parent performs live all-state dedup.

Independent parent verification: read the complete proof and reran all five tests against the retained owned localhost fixtures. All passed, including the native stale-hash refusal and post-failure persisted readbacks. Live all-state provider/credential/save, provider/stale and provider/manual-model searches found no matching root. Log: provider-connector-proof/parent-provider-boundaries.log.

Activity

  1. changed the title [-]bug(platform): bug: switching custom-provider model source shows removed model IDs that Save does not store[/-] [+]bug(platform): switching custom-provider model source shows removed model IDs that Save does not store[/+] on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions