fix(provider): improve Kimi context, model names, and image attachments - #102
Conversation
|
Hey Wallacy, thanks for this. Took me a bit to go through all three fixes together. The Kimi context tier (#87) and the provider prefix toggle (#92) look clean to me. The image normalizer (#94) matches what opencode CLI does, so the 2000×2000 + 5MB thresholds are correct per the upstream contract. I checked the package, There's a size guard in Two questions on this:
Also a minor one on No live provider test was run per your checklist, which is fair given the gateway behavior. I'm happy to test the normalizer path locally with a real vision model before we merge, or if you've already validated it works against the gateway, let me know and I'll take your word for it. Tests look solid otherwise. Once we align on the guard ordering question, I'm good to merge this. |
|
Thanks for the careful review. You were right: the ordering was not intentional. The 2 MB raw top-level guard ran inside convertMessage() before image normalization, so it could replace images that Photon could have resized or compressed into a provider-safe payload. I applied a follow-up that:
Follow-up commit: |
|
Yep, that nails it. I went through the diff again and the ordering is right now: Dropping The while-loop rewrite and the 2MB-raw-but-5MB-base64 regression test, both good. CI green on |
- CHANGELOG: move [Unreleased] to [0.5.0] — 2026-08-05 with section "Changed" noting MAX_TOP_LEVEL_IMAGE_BYTES removal in PR #102 - package.json + package-lock.json: 0.4.5 -> 0.5.0 - docs/issues/38-*: mark superseded by #94 (MAX_TOP_LEVEL_IMAGE_BYTES removed, replaced by image normalizer running before payload guard) - docs/issues/47-*: rename from seq 44 to resolve collision with issue #94 doc, fix header title (Issue #44 -> #103) VSIX built (opencode-copilot-chat-0.5.0.vsix, 1.82 MB, 133 tests pass) and installed locally. Not pushed, not tagged, not published.
📝 What does this change?
Implements fixes for #87, #92, and #94:
Closes #87
Closes #92
Closes #94
🧪 How did you test it?
npm testpasses: 132 tests.npm run compilepasses.npm run packagesuccessfully generates the VSIX.✅ Checklist
npm run compilepasses