Skip to content

fix: preserve image input capabilities across integrations - #4668

Draft
TykanN wants to merge 2 commits into
lidge-jun:devfrom
TykanN:fix/anthropic-vision-metadata
Draft

TykanN wants to merge 2 commits into
lidge-jun:devfrom
TykanN:fix/anthropic-vision-metadata

Conversation

@TykanN

@TykanN TykanN commented Sep 15, 2026

Copy link
Copy Markdown

Summary

Closes #4667

Fix image-input capability loss across integration configurations, not only the initially reported Aside/Pi/GJC examples.

  • Add shared modelInputModalities for the nine known Claude model seeds to both anthropic and anthropic-apikey. Missing source metadata previously triggered text-only/unknown export defaults; existing per-model overrides remain authoritative.
  • Fix two additional exporters that dropped even declared capabilities: OpenClaw now emits schema-filtered input; Kimi CLI emits capabilities: ["image_in"] for catalog-backed image input. These exporter fixes apply to any declared image-capable model, not just Anthropic.
  • Add production-catalog regressions for all 14 capability-aware registered exporters: Pi, Aside, Prime, omo, OMP, GJC, DSH, OpenCode V1/V2, ZCode, Cline, Hermes, Raycast, OpenClaw and Kimi. Also cover Codex input_modalities and Claude discovery capabilities.image_input.supported, including Desktop/readable aliases and [1m] variants, for both Anthropic auth flows.
  • Preserve unknown-model defaults and existing client schema/eligibility constraints. Do not infer vision from arbitrary model names or overwrite explicit text-only settings. Update public docs and mapped architecture notes.

Scope and evidence boundary

All 15 registered exporters and the additional Codex/Claude/MMX surfaces were audited. The remaining registered exporter, MiniMax Code, exposes no image field in the current local contract, and an authoritative upstream field could not be established; no unsupported field was invented. Connection-only/cache shapes (Claude gateway cache, Desktop static config, MMX launcher) are unchanged. This is not a blanket claim that every application supports images or that every future/date-pinned Claude alias has verified metadata.

Official references: Claude models, OpenClaw schema, OpenClaw text-only default, Kimi capabilities.

Related prior work: #3474 fixed combo metadata; #3454 fixed Anthropic reasoning advertisement; #4497/#4534 fixed image wire handling. None replaced this cross-integration capability audit.

Verification

  • Red before fixes: six initial export cases (three clients × two auth flows) failed with input: ["text"]; registry assertion returned undefined. OpenClaw and Kimi each separately failed for missing supported capability fields after the registry fix.
  • Passed: focused provider, configuration and all-client export checks — 164 tests across five files; Codex/Claude production-catalog suites — 54 tests, 262 assertions.
  • Passed: bun run typecheck, bun run privacy:scan, bun run structure:check, git diff --check; cd docs-site && bun install --frozen-lockfile && bun run build — 441 pages (nonblocking build warnings).
  • Broader integration run: bun test tests/config tests/clients tests/integrations1178 pass, 3 skip, 2 fail. Both failures are in unchanged remote-workspace-command-runner.test.ts: the local Bun executable/ancestor path fails bubblewrap executable and parent directories must not be group or world writable. Reproduced independently; no trust check weakened.
  • Changed-suite limitation: bun run test:changed selected 965 files but a Bun 1.4.2 parallel worker crashed with SIGSEGV in routing-policy-surface-parity.test.ts, aborting the remaining files. That file alone passed (6 tests). The --parallel=1 retry produced no test progress for several minutes and was stopped. Full-suite/local-CI green is not claimed.
  • Actual successful image attachment in Aside after a manual config edit was reported by the issue author. This PR's tests verify generated capability declarations, not paid live model requests in every client.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

No authentication, credentials, routing or image-wire behavior changed; privacy scan passed. Submitted as draft per contributor policy and because broad validation is not fully green.

Review readiness

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features

    • Claude models now advertise text and image input capabilities for Anthropic OAuth and API-key configurations.
    • Generated OpenClaw and Kimi Code configurations now include image-input capability metadata when supported.
    • Explicit model overrides remain respected, while unknown models receive no inferred capabilities.
  • Documentation

    • Added guidance covering Anthropic image support, client configuration refresh requirements, and capability metadata across integrations.
    • Clarified that image capability metadata does not change xAI behavior or transport handling.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 91d7f7c8-fcbe-4827-a4b0-b004d23a7307

📥 Commits

Reviewing files that changed from the base of the PR and between aa91958 and a9b3654.

📒 Files selected for processing (15)
  • docs-site/src/content/docs/guides/providers.md
  • src/clients/config-export.ts
  • src/providers/registry/entries-core.ts
  • src/providers/registry/model-seeds.ts
  • structure/clients/integrations.md
  • structure/providers/xai-grok.md
  • structure/runtime.md
  • structure/subagents.md
  • structure/transports/inventory.md
  • tests/claude-integration/claude-model-info.test.ts
  • tests/codex-integration/catalog-input-modality-enum.test.ts
  • tests/config/client-config-export-new-clients.test.ts
  • tests/config/client-config-new-clients.test.ts
  • tests/providers/provider-registry-parity.test.ts
  • tests/server/management-client-config-route.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change adds image-input metadata to Anthropic model seeds, propagates it through the catalog, exports it in supported client formats, and adds registry, catalog, discovery, and management-route coverage for both Anthropic authentication modes.

Changes

Anthropic capability metadata

Layer / File(s) Summary
Registry seeds and catalog propagation
src/providers/registry/model-seeds.ts, src/providers/registry/entries-core.ts, tests/providers/provider-registry-parity.test.ts, tests/codex-integration/*, tests/claude-integration/*
Known Claude seeds now declare ["text", "image"] for both Anthropic providers. Explicit overrides remain authoritative, and unknown models remain undeclared. Catalog and Claude discovery tests validate the propagated metadata.
Client capability export rules
src/clients/config-export.ts, tests/config/*
OpenClaw exports supported, deduplicated catalog modalities. Kimi Code exports capabilities: ["image_in"] only for models declaring image input.
Management configuration output coverage
tests/server/management-client-config-route.test.ts
The production export path now has coverage for image-capability fields across supported client configuration formats for OAuth and API-key Anthropic providers.
Capability metadata documentation
docs-site/src/content/docs/guides/providers.md, structure/clients/integrations.md, structure/runtime.md, structure/subagents.md, structure/transports/inventory.md, structure/providers/xai-grok.md
Documentation describes Anthropic seed metadata, client-specific output fields, conservative handling of unknown models, and unchanged transport and eligibility behavior.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant AnthropicProvider
  participant ModelCatalog
  participant ConfigExporters
  AnthropicProvider->>ModelCatalog: declare text and image modalities
  ModelCatalog->>ConfigExporters: provide input modalities
  ConfigExporters-->>AnthropicProvider: emit client-specific capability fields
Loading

Merge Risk: ⚪ Minimal · up to a9b36

The capability metadata and supported client exports are covered for both Anthropic authentication modes, including override and unknown-model behavior. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 9 files. (6 skipped: 6 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: preserving image-input capability metadata across Anthropic provider exports and integrations.
Linked Issues check ✅ Passed Issue #4667 coding requirements are met. src/providers/registry/model-seeds.ts adds ANTHROPIC_MODEL_INPUT_MODALITIES for all nine ANTHROPIC_MODELS entries with ["text", "image"]. `src/provider…
Out of Scope Changes check ✅ Passed The changed source files implement the capability path required by issue #4667: shared Anthropic seed metadata, registry propagation, OpenClaw serialization, and Kimi serialization. The changed tests …
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 9 files. (6 skipped: 6 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 15, 2026
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (1/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 1/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

1/4 boxes ticked.

This PR stays in draft until every box above is ticked.

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 67 / 80

이 PR은 초안(draft) 이고, 이슈 #4667을 닫으려는 카탈로그·익스포터 버그 수정이다. 지금 dev(HEAD aa91958e3, 패키지 2.56.0)에서 anthropic / anthropic-apikey 레지스트리 엔트리는 모델 목록·컨텍스트·effort 사다리는 있지만 modelInputModalities 시드가 없다. configuredInputModalities 가 비면 카탈로그가 ["text"] 바닥으로 떨어지고, Aside/Pi/GJC 같은 클라이언트가 Claude를 텍스트 전용으로 내보내 이미지 첨부가 막힌다. 이슈 작성자가 Aside 설정에 "image" 를 수동으로 넣자 첨부가 된 관찰과도 맞다.

고침은 세 층이다. 첫째, model-seeds.tsANTHROPIC_MODEL_INPUT_MODALITIES 를 두고 아홉 Claude 시드에 ["text","image"] 를 심은 뒤, entries-core.ts 의 OAuth·API-key 양쪽 엔트리에 붙인다. enrichProviderFromRegistry 는 fill-only 라서 운영자가 이미 claude-sonnet-5: ["text"] 처럼 적어 둔 값은 덮어쓰지 않고, 없는 키만 채운다. 둘째, OpenClaw 익스포터가 선언된 inputModalities 를 스키마가 아는 text|image|video|audio 만 골라 input 배열로 내보낸다(없으면 필드 생략 — OpenClaw 기본이 text-only로 떨어지는 구멍). 셋째, Kimi 익스포터가 카탈로그에 image가 있을 때만 capabilities: ["image_in"] 를 낸다. 예전에 “capabilities를 절대 안 낸다”던 주석·테스트는 이 계약에 맞게 바뀌었다.

회귀는 넓다. 레지스트리 패리티, OpenClaw/Kimi 단위, management 경로에서 capability-aware 익스포터 14종(Aside/Pi/Prime/omo/OMP/GJC/DSH/OpenCode/ZCode/Cline/Hermes/Raycast/OpenClaw/Kimi), Codex input_modalities, Claude discovery capabilities.image_input.supported(readable·desktop 별칭과 [1m] 포함)까지 본다. MiniMax Code는 로컬 계약에 image 필드가 없어 가짜 필드를 만들지 않았다고 문서에 적어 두었다. docs-site providers 가이드와 structure/clients/integrations.md / runtime.md 도 같은 이야기를 한다. xai-grok·subagents·transports 쪽 한두 줄 링크는 runtime 앵커를 가리키는 structure 교차 참조로 보인다(구조 SSOT 패턴).

types.ts / config.ts 모놀리스 본문을 고치지 않는다. close-don't-rebase 대상이 아니다. #3474·#3454·#4497/#4534 와 겹치는 “다른 층”을 PR 본문이 잘 구분했다. 다만 작성자가 스스로 full-suite/local-CI 초록을 주장하지 않았다. bubblewrap 권한 실패 2건은 이 PR과 무관해 보이고, test:changed 병렬 SIGSEGV는 환경 이슈로 적혀 있다. draft 체크리스트도 아직 비어 있다(최신 dev push만 체크됨).

라인 / 경로 수준 주의 포인트:

src/providers/registry/model-seeds.ts - ANTHROPIC_MODEL_INPUT_MODALITIESANTHROPIC_MODELS 전 원소에 vision을 준다. 공식 overview와 맞추려는 선택이다. 시드에 새 모델이 들어오면 자동으로 따라가므로, 나중에 text-only Claude가 생기면 예외 목록이 필요해진다
src/providers/registry/entries-core.ts (anthropic / anthropic-apikey) - 시드 spread가 양쪽 auth에 동일하게 들어갔다. OAuth·키 비대칭 구멍은 없다
src/clients/config-export.ts buildOpenclawClientConfig - pdf 같은 비지원 modality는 버리고, 지원 목록만 dedupe한다. 빈 배열이면 input 키 자체를 생략한다(OpenClaw 기본 text-only를 피하려는 의도)
같은 파일 buildKimiClientConfig - image가 있을 때만 image_in. 다른 capability는 이름에서 추론하지 않는다. 주석·테스트가 예전 “never emit”에서 이 계약으로 바뀌었는지 리뷰어가 한 번만 보면 된다
structure/runtime.md - “modelInputModalities: ["text", "image"] per model” 표현은 실제 타입이 모델 id → 배열 맵인데 문장이 조금 단순하다. 의미는 통한다
tests/server/management-client-config-route.test.ts - production loadExportModels 로 14 익스포터를 한 번에 밀어 버그 재발을 잘 막는다. 초안 상태에서 CI 전체 초록은 아직 작성자 주장 밖이다

메인테이너의 판단이 필요한 지점

  • draft를 ready로 올리기 전에 작성자가 말한 bubblewrap 2실패·SIGSEGV와 무관함을 메인테이너가 어느 선까지 재확인할지
  • OpenClaw/Kimi 익스포터 변경이 Anthropic만이 아니라 “카탈로그에 image가 있는 모든 모델”에 적용되는데, 그 확장을 이번 PR에 같이 넣을지(이슈 본문은 의도적으로 같이 넣으라고 함)
  • Claude discovery 테스트가 생성된 모든 alias(포함 [1m])에 image_input.supported === true 를 요구하는 것이 장기적으로 맞는지
  • structure 교차 링크(xai-grok/subagents/transports)를 최소 runtime+integrations만 남길지, 지금처럼 넓게 둘지(structure:check가 통과했다면 유지해도 됨)

너의 추천
초안이므로 지금 머지하지 말고, 체크리스트를 채운 뒤 ready로 전환하는 쪽이 맞다. 뿌리 원인(Anthropic 시드에 modelInputModalities 부재 + OpenClaw/Kimi가 선언조차 버리던 구멍)은 dev 코드와 이슈 재현이 일치하고, fill-only·unknown 미추론·명시 오버라이드 보존은 기존 카탈로그 불변식과 맞다. ready 전에 (1) 포커스 스위트만이라도 다시 초록 확인하고 (2) runtime.md 한 줄 표현만 다듬으면 충분하다. types/config 스플릿 때문에 닫을 PR이 아니다. 충돌 없으면 유지·rebase 후 ready 전환을 권한다.

이 댓글은 grok-bot이 작성했습니다

@TykanN
TykanN marked this pull request as ready for review September 15, 2026 05:34
@github-actions
github-actions Bot marked this pull request as draft September 15, 2026 05:34
Missing modelInputModalities on both Anthropic registry entries caused Aside, Pi and GJC exports to fall back to text-only input. Seed the known Claude models once and preserve explicit operator overrides through existing enrichment.

Add registry and production catalog-to-client regression coverage for both auth flows. Update provider documentation and mapped architecture notes.

Refs lidge-jun#4667
Preserve declared OpenClaw input modalities and emit Kimi image_in capabilities instead of losing catalog-backed vision support. Keep unknown-model defaults and schemas without an established capability field unchanged.

Cover all 14 capability-aware config exporters and the Codex/Claude catalog surfaces from both Anthropic auth-provider seeds. Record the complete integration scope in the docs.

Refs lidge-jun#4667

Co-authored-by: Theo / Taeyoon Kang <kang3603a@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants