diff --git a/structure/adapters/registry.md b/structure/adapters/registry.md index c43fc06484..78ee66311d 100644 --- a/structure/adapters/registry.md +++ b/structure/adapters/registry.md @@ -56,8 +56,9 @@ Some adapters share another adapter's routed-tool semantics while retaining inde `ClientModelConfig` field #4 as the per-account disabled gate, field #18 as the per-account context window, and field #5 as an optional `supportsImages` tri-state — a present value asserts image support or its absence, while an omitted field stays unknown (the #1796 - precedent). `src/adapters/devin/live-models.ts` collapses that tri-state across each base - model's effort variants: unmeasured rows abstain, unanimous measured rows advertise + precedent). `src/adapters/devin/live-models.ts` collapses that tri-state across the + rows each base model's collapsed UID gathers — the EFFORT_TOKENS suffixes, tier rows + like `-1m` included: unmeasured rows abstain, unanimous measured rows advertise `["text"]` or `["text", "image"]`, and measured disagreement stays unadvertised. The registry records those relationships with `contractParent`. A parent relationship does **not** mean the registry recursively constructs a parent adapter and injects it into the child. Azure and MiMo keep owning their existing internal composition. This avoids making production constructors depend on test/conformance needs and keeps this authority refactor behavior-neutral. diff --git a/structure/catalog.md b/structure/catalog.md index 57c7bbdcd9..0f995ec4fa 100644 --- a/structure/catalog.md +++ b/structure/catalog.md @@ -95,10 +95,11 @@ Provider live-model lists are cached with a configured TTL (`src/codex/model-cac deleting, or editing a provider's shape clears that per-provider cache; a disabled-only change deliberately does not, because a disabled provider is already excluded from the catalog gather instead. Codex's own `models_cache.json` is a different cache, invalidated by catalog refresh. -A Devin live row spreads its measured `contextWindow`, `reasoningEfforts` and -`inputModalities` before `catalogHintsFromProviderConfig`, so exact `modelCapabilities` -declarations, the legacy `modelInputModalities` record and the vision-sidecar rewrite keep -precedence and a live value survives only when none of them applies. + +A Devin live row spreads its measured `inputModalities` before +`catalogHintsFromProviderConfig`, so exact `modelCapabilities` declarations, the legacy +`modelInputModalities` record and the vision-sidecar rewrite keep precedence and the live +value survives only when none of them applies. For `liveModels: false`, a static provider publishes the ordered union of `models` and `retainModels`. When `models` is absent or empty, its configured `defaultModel` seeds that diff --git a/tests/providers/devin-live-models.test.ts b/tests/providers/devin-live-models.test.ts index 56dd99507c..db365e2062 100644 --- a/tests/providers/devin-live-models.test.ts +++ b/tests/providers/devin-live-models.test.ts @@ -45,12 +45,20 @@ function seedCatalog(...entries: Buffer[]): void { )); } +// A cache miss must fail the test, never dial Cognition: every case here is +// supposed to be served by the seeded catalog, so the network is a bug. +let realFetch: typeof globalThis.fetch; beforeEach(() => { + realFetch = globalThis.fetch; + globalThis.fetch = (() => { + throw new Error("devin-live-models.test.ts reached the network — the seeded catalog cache missed"); + }) as typeof globalThis.fetch; setCachedCatalogForTests(null); clearModelCache("devin-test"); providerCacheGenerations.delete("devin-test"); }); afterEach(() => { + globalThis.fetch = realFetch; setCachedCatalogForTests(null); clearModelCache("devin-test"); providerCacheGenerations.delete("devin-test");