Skip to content

fix: persist explicit BYOK image capabilities - #225

Merged
hetaoBackend merged 1 commit into
mainfrom
fix/byok-image-capability
Sep 20, 2026
Merged

hetaoBackend merged 1 commit into
mainfrom
fix/byok-image-capability

Conversation

@hetaoBackend

@hetaoBackend hetaoBackend commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Change

Refs #213. Unknown custom models could not declare image support through provider add, and the provider input normalizer discarded newly supplied capabilities. Add --support-image for every listed model and preserve/merge explicit capability metadata through create, candidate save, and update. Share the process-local model input contract so these operations expose the same fields.

Existing YAML declarations (modalities.input: [text, image] or capabilities.support_image: true) already enable images. Their semantics stay unchanged: generic attachment: true does not imply image input, and this change does not infer vision from model names or the SDK catalog. The configuration guide covers new and existing providers, text-only rollback, and the text-only scope of connection tests.

The Ollama model page currently lists vision support for the reported model. This independently checks the catalog claim, not live endpoint acceptance.

Community contribution

Reviewed and adapted the CLI declaration and capability-preservation approach from smartworldarafath's patch. The commit retains a Co-authored-by trailer. Capability inference from generic attachments, undocumented aliases, and catalog-only fallback were not imported. Validation below was run independently.

Validation

  • Revision: db4ea90fa66b33f89fe4543e676ee0eaa1c9e2a2.
  • Focused provider normalization, management, model-reference and process-local tests: 165 passed. The new normalization regression failed before the fix because the saved capabilities were undefined.
  • Built provider add --help includes the flag. Packaged offline BYOK checks exercise both save-only and --use paths, multiple models, failed-test atomicity, YAML reload in a new process, and actual OpenAI-compatible image request bodies. Existing modality configuration succeeds; undeclared and attachment-only models retain text-only behavior. PNG input goes through the real JPEG preprocessing path.
  • Full pnpm verify on the clean committed revision above: all 14 gates passed, macOS arm64, Node 26.4.0. This includes 3,615 capability tests, 17 CLI/ACP smoke tests, the offline BYOK fixture, and real macOS sandbox checks.
  • git diff --check passed. No source files were added or removed; all modified Vitest files were already registered, so no inventory regeneration was needed.
  • NOT RUN: live Ollama/DeepSeek or other provider requests, interactive clipboard acceptance, Linux/Windows execution locally, and image transport for Anthropic Messages / OpenAI Responses. ACP currently advertises image: false; this PR does not add ACP image input.

Publication and contribution checks

  • I have permission to contribute these changes under the existing licenses applicable to the changed files/packages; imported material and its provenance are identified and existing notices are preserved.
  • No credentials, account data, real user content, internal source history or private review material is included.
  • Added/removed source files were reviewed before regenerating release/public-source.json; new tests are declared in test/vitest-suites.json where applicable.
  • Shared English/Chinese documentation and capability/verification records are updated where applicable. Mock/offline results are not described as live-service acceptance.

Maintainer handoff

Publication scope or license changes: none. Shared-source port: pending. Keep this PR open for review; no merge, release, or deployment is included.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Add provider add --support-image and preserve capability metadata through create and update inputs. Cover saved configuration and actual image transport with the packaged offline BYOK fixture.

Adapted the CLI declaration and capability preservation approach from smartworldarafath/minimax-code commit 6ec8ad0. Keep explicit image-input semantics without inferring vision from generic attachments or catalog fallbacks.

Co-authored-by: smartworldarafath <smartworld.bd.710@gmail.com>
@hetaoBackend
hetaoBackend merged commit 939121d into main Sep 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant