feat(vision): derive API-engine vision from the models.dev catalog#270
Merged
Conversation
"kimi-for-coding-k3 can't see images" was a config gap, not a model limit: image gates checked only the engine JSON's declared capabilities:["vision"], and engines created from the models.dev catalog picker never carry capabilities — so every catalog API engine was treated as blind even when the catalog itself says the model accepts image input. New single source of truth in core models-registry: - lookupCatalogModelAttachment(engineId): models.dev `attachment` via the same exact sanitized providerId-modelId match as the pricing lookup — CLI engines and hand-named engines are untouched; null = catalog doesn't know, never "no vision". - engineSupportsVision(engine): declared 'vision' capability ALWAYS wins (the user override for stale catalog rows — kimi-for-coding/k3 is attachment:false in the catalog while the underlying kimi-k3 is multimodal), otherwise catalog attachment === true. All five vision gates now route through it: visionSupportNote (attach- time warning), session-resume (API base64 parts), session-companion (codex localImage), adapter structured API dispatch, and the API-agent execution plan (the last two found blocking 0.96/0.95 by codex in review — the first cut missed them). Exported from the core barrel. Tests: catalog vision suite (override wins, catalog-true inherits, unknown stays declaration-only, missing cache degrades) + adapter regression for a catalog-attachment engine with NO declared capabilities; the adapter core-mock now defines engineSupportsVision explicitly (the spread `actual` resolves to built dist and may predate the helper). Review: agon review --risk auto, 6/6 engines — codex's 2 blocking + 1 important all fixed; agy's missing-fs-imports claim refuted (imports exist, tests green). ⚔️ Forged by [Agon](https://github.com/KERNlang/agon) Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
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.
"kimi-for-coding-k3 can't see images" was a config gap, not a model limit: image gates checked only the engine JSON's declared capabilities:["vision"], and engines created from the models.dev catalog picker never carry capabilities — so every catalog API engine was treated as blind even when the catalog itself says the model accepts image input.
New single source of truth in core models-registry:
attachmentvia the same exact sanitized providerId-modelId match as the pricing lookup — CLI engines and hand-named engines are untouched; null = catalog doesn't know, never "no vision".All five vision gates now route through it: visionSupportNote (attach- time warning), session-resume (API base64 parts), session-companion (codex localImage), adapter structured API dispatch, and the API-agent execution plan (the last two found blocking 0.96/0.95 by codex in review — the first cut missed them). Exported from the core barrel.
Tests: catalog vision suite (override wins, catalog-true inherits, unknown stays declaration-only, missing cache degrades) + adapter regression for a catalog-attachment engine with NO declared capabilities; the adapter core-mock now defines engineSupportsVision explicitly (the spread
actualresolves to built dist and may predate the helper).Review: agon review --risk auto, 6/6 engines — codex's 2 blocking + 1 important all fixed; agy's missing-fs-imports claim refuted (imports exist, tests green).
⚔️ Forged by Agon