fix(registry): declare CommandCode deepseek/deepseek-v4.1-flash natively image-capable - #5039
Conversation
…pable on CommandCode Move the id from COMMAND_CODE_TEXT_ONLY_MODELS to COMMAND_CODE_IMAGE_MODELS. The gateway route was unverified when lidge-jun#4505 classified it text-only; the upstream probe that issue asked for is now run end to end: - A 3x3 random-color grid (180x180 PNG, six candidate colors) delivered as a user-message image and as a tool_result image both came back 9/9 correct (~1e-7 by guessing), with no vision-sidecar call in either request window. - Both requests: HTTP 200, adapter command-code, on an existing 2.58.0 install. Update the pinned regression tests for the new classification; opencode-go's route keeps its text-only declaration (no probe evidence) and the text-only mechanism stays in place for the next route that measures text-only.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe command-code DeepSeek V4.1-Flash route is moved from the text-only registry to the native image-capable registry. Its derived modalities and tests now expect ChangesDeepSeek image modality promotion
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The promoted route and its capability tests align, with no actionable current-head risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
리뷰 · 우선순위 76 / 80설명 이 PR은 CommandCode 게이트웨이의 닫힌 이슈 #4505가 처음에 네 경로(opencode-go / command-code × GLM-5.3-Flash / DeepSeek V4.1-Flash)의 변경 내용은 좁습니다. id를 라인 수준 src/providers/registry/model-seeds.ts COMMAND_CODE_IMAGE_MODELS - id를 IMAGE 목록에 넣는 순간 사이드카가 꺼집니다. probe가 틀리면 예전에 사이드카가 막아 주던 ‘이미지가 조용히 버려지는’ 실패가 다시 열립니다. 헤더의 verified-negative 경고와 같은 위험입니다. 메인테이너의 판단이 필요한 지점
너의 추천 CI(changes/hygiene와 flash-route-image-modalities 포함 관련 스위트)가 초록이면 merge하세요. 범위가 #4505가 남겨 둔 probe 후속과 정확히 맞고, opencode-go는 건드리지 않으며, 테스트·주석·빈 TEXT_ONLY 메커니즘 보존까지 한 덩어리로 정리된 유지보수형 레지스트리 PR입니다. types/config 분할 때문에 닫을 대상이 아닙니다. 메인테이너가 probe 원본을 직접 보고 싶다면 merge 전에 코멘트만 짧게 요청하면 됩니다. 이 댓글은 grok-bot이 작성했습니다 |
|
✅ Deterministic PR hygiene checks passed. |
|
Raw receipts for the probe, since the description carried only the summary. Environment: Payload: 180x180 PNG, 3x3 grid, six candidate colors per cell, every cell chosen independently at random — a blind answer matches all nine with ~(1/6)^9 ≈ 3e-7 probability. Question: name the nine colors top-to-bottom, left-to-right. Probe A — image as a user message
{"timestamp":1789714653678,"provider":"command-code","model":"deepseek/deepseek-v4.1-flash","status":200,"durationMs":2766,"usage":{"inputTokens":7853,"outputTokens":159,"cacheReadInputTokens":7296},"adapter":"command-code","sendCount":1,"recoveryKinds":[]}Probe B — image as a
{"timestamp":1789714931163,"provider":"command-code","model":"deepseek/deepseek-v4.1-flash","status":200,"durationMs":2747,"usage":{"inputTokens":7916,"outputTokens":300,"cacheReadInputTokens":7424},"adapter":"command-code","sendCount":1,"recoveryKinds":[]}
{"timestamp":1789714975449,"provider":"command-code","model":"deepseek/deepseek-v4.1-flash","status":200,"durationMs":2523,"usage":{"inputTokens":7916,"outputTokens":245,"cacheReadInputTokens":7680},"adapter":"command-code","sendCount":1,"recoveryKinds":[]}No vision-sidecar call appears in either request window: the nearest luna attempt in the same log is a 429 two minutes before probe A and is unrelated to both. Version note: the probe ran on released 2.58.0. The claim concerns the upstream gateway accepting pixels end-to-end; the command-code adapter's image path is not version-gated, but happy to re-run against a tip build if a fresh receipt is preferred. Reproduction script (python3, stdlib only — regenerates a fresh random grid per run)import zlib, struct, base64, json, random
COLORS = {"红": (255,0,0), "绿": (0,170,0), "蓝": (0,0,255),
"黄": (255,255,0), "白": (255,255,255), "黑": (0,0,0)}
KEYS = list(COLORS)
grid = [[random.choice(KEYS) for _ in range(3)] for _ in range(3)]
CELL = 60
W = H = CELL * 3
rows = []
for y in range(H):
row = bytearray([0]) # PNG filter: None
for x in range(W):
row += bytes(COLORS[grid[y // CELL][x // CELL]])
rows.append(bytes(row))
raw = b"".join(rows)
def chunk(tag, data):
return struct.pack(">I", len(data)) + tag + data + struct.pack(">I", zlib.crc32(tag + data) & 0xFFFFFFFF)
png = (b"\x89PNG\r\n\x1a\n"
+ chunk(b"IHDR", struct.pack(">IIBBBBB", W, H, 8, 2, 0, 0, 0))
+ chunk(b"IDAT", zlib.compress(raw, 9))
+ chunk(b"IEND", b""))
print("ground truth:")
for r in grid:
print(" " + " ".join(r))
req = {
"model": "command-code/deepseek/deepseek-v4.1-flash",
"max_tokens": 300,
"messages": [{"role": "user", "content": [
{"type": "image", "source": {"type": "base64", "media_type": "image/png",
"data": base64.b64encode(png).decode()}},
{"type": "text", "text": "这是一张 3x3 九宫格图片,每格是一个纯色方块。请按从上到下、每行从左到右的顺序,说出九格各自的颜色(用中文,只列颜色即可)。"},
]}],
}
json.dump(req, open("/tmp/probe_req.json", "w"))
# POST /tmp/probe_req.json to the running proxy's /v1/messages with the loopback credential.
# Probe B uses the same image block nested in a tool_result instead of the user message. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. Automatic draft conversion failed. Please convert this pull request to a draft manually until every box above is ticked. |
|
Merging. The probe is what this needed and it is recorded where the next reader will find it. #4505 asked for upstream evidence before promoting the id, and the entry now carries it: a 3x3 random-colour grid read 9/9 correct on both the user-message and the tool_result path, with request logs showing no vision-sidecar call in either window. That is the difference between a declaration and a guess, and it is why the sibling Emptying |
Summary
command-codenow declaresdeepseek/deepseek-v4.1-flashas natively image-capable: the id moves fromCOMMAND_CODE_TEXT_ONLY_MODELS(now empty) intoCOMMAND_CODE_IMAGE_MODELSinsrc/providers/registry/model-seeds.ts, with the probe evidence recorded at the entry.opencode-go's route is untouched — it stays text-only and sidecar-covered, because no probe evidence exists for that gateway.tests/providers/flash-route-image-modalities.test.tsare updated for the new classification; the text-only/sidecar mechanism keeps its coverage via the opencode-go route and the hand-made collapse case.Verification
@bitkyc08/opencodex2.58.0 againstapi.commandcode.aiwith a live OAuth account): a 3x3 random-color grid (180x180 PNG, six candidate colors, per-cell random) was delivered twice — as a user-message image and as atool_resultimage. Both replies named all nine cells in row-major order exactly (9/9; ~1e-7 by guessing). Both request rows in the proxy usage log showprovider=command-code,adapter=command-code, HTTP 200, with no vision-sidecar call in either request window.bun test tests/providers/flash-route-image-modalities.test.ts— 10 pass / 0 fail on the rebased head.bun run typecheck— clean.bun run test(full suite) — 26787 pass / 35 fail on this workstation. Every failure reproduces identically with this change stashed on the same tree (e.g.tests/server/management-provider-validation.test.tsplustests/lab/lab-fabric-task.test.ts: 165 pass / 21 fail both with and without the change), and the remainder are platform-conditional files (Windows-only paths, keyring-dependent suites). They are environment-only here and unrelated to registry metadata.Checklist
docs-site/guides/sidecars.mddocuments the sidecar mechanism generically, andstructure/names only the context-window hints on this route.)Summary by CodeRabbit
New Features
Bug Fixes
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
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.