Allow discovery refresh to adopt redundant model names #34

Closed
opened 2026-08-25 02:58:57 +01:00 by vnprc-agent · 0 comments

Let existing provider catalogues adopt authenticated discovery when their only extra model field is a redundant name equal to id.

Primary goals:

  • Adopt redundant names — allow discover-refresh to accept name only when every value exactly equals that model's id, then omit name from the discovered replacement.
  • Preserve the safety boundary — continue refusing custom display names and fields such as compat or thinkingLevelMap that discovery cannot regenerate.
  • Give executable guidance — replace the current recommendation to use add --models-file, because add refuses an existing provider.
  • Witness both paths — cover successful redundant-name adoption and refusal of a genuinely custom name without reading a bearer before validation permits it.

Current state and specifics

The refresh allowlist at scripts/pi-provider:851-856 classifies every name field as hand-authored, including the common open-world catalogue shape { "id": "model-a", "name": "model-a" }. Such a catalogue cannot enter the discovery lifecycle even though dropping that redundant field loses no information.

The resulting diagnostic says to refresh with manual add --models-file, but scripts/pi-provider:988-991 rejects both add and discover-add whenever the provider already exists. The suggested command therefore cannot perform an in-place update.

The checks around tests/pi-provider.sh:1816-1832 correctly prove that a custom name is refused before Age or HTTP. Keep that witness, and add a distinct fixture where name == id is accepted and normalized away. This recommendation follows from post-merge testing of PR allod/nexus#33; its 321 synthetic assertions and the full flake checks otherwise pass.

Scope

In scope: redundant-name adoption during discover-refresh, actionable refusal text for unsupported existing fields, documentation, and focused tests. Out of scope: merging arbitrary hand-authored model metadata, changing manual add into a general update command, or weakening refusal for fields discovery cannot reproduce.

Let existing provider catalogues adopt authenticated discovery when their only extra model field is a redundant `name` equal to `id`. Primary goals: - **Adopt redundant names** — allow `discover-refresh` to accept `name` only when every value exactly equals that model's `id`, then omit `name` from the discovered replacement. - **Preserve the safety boundary** — continue refusing custom display names and fields such as `compat` or `thinkingLevelMap` that discovery cannot regenerate. - **Give executable guidance** — replace the current recommendation to use `add --models-file`, because `add` refuses an existing provider. - **Witness both paths** — cover successful redundant-name adoption and refusal of a genuinely custom name without reading a bearer before validation permits it. ### Current state and specifics The refresh allowlist at `scripts/pi-provider:851-856` classifies every `name` field as hand-authored, including the common open-world catalogue shape `{ "id": "model-a", "name": "model-a" }`. Such a catalogue cannot enter the discovery lifecycle even though dropping that redundant field loses no information. The resulting diagnostic says to refresh with manual `add --models-file`, but `scripts/pi-provider:988-991` rejects both `add` and `discover-add` whenever the provider already exists. The suggested command therefore cannot perform an in-place update. The checks around `tests/pi-provider.sh:1816-1832` correctly prove that a custom name is refused before Age or HTTP. Keep that witness, and add a distinct fixture where `name == id` is accepted and normalized away. This recommendation follows from post-merge testing of PR allod/nexus#33; its 321 synthetic assertions and the full flake checks otherwise pass. ### Scope In scope: redundant-name adoption during `discover-refresh`, actionable refusal text for unsupported existing fields, documentation, and focused tests. Out of scope: merging arbitrary hand-authored model metadata, changing manual `add` into a general update command, or weakening refusal for fields discovery cannot reproduce.
vnprc closed this issue 2026-08-25 03:32:41 +01:00
Sign in to join this conversation.
No description provided.