Repository navigation
fix(zcode): carry reasoning ladders and image input into the provider_config.json store - #6828
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughZCode configuration now uses a shared helper to select reasoning efforts. Provider-store model rules can include authoritative context windows, image-input support, and selectable reasoning levels. Models without any of these capabilities are omitted. ChangesZCode model capabilities
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No concrete issue remains that should delay merging after normal checks. 🚥 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 |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
…_config.json store ZCode 3.14 moved custom providers to v2/provider_config.json (lidge-jun#5348), and the store export carried over only each model's contextWindow — the reasoning ladder lidge-jun#4147 added to the legacy v2/config.json block and the catalog's image modality were both dropped, so every opencodex model showed no thought-level picker and no attachment support in current ZCode builds. Write the capabilities the client's own store schema accepts, extracted from the ZCode CLI bundle's strict zod definitions: config.optionSpecs.reasoningLevel. values (the same Codex-vocabulary ladder the legacy block emits, minus the none sentinel; the chosen level is validated against values and forwarded verbatim to reasoning.effort) and config.properties.inputFormat.supportsImage when the catalog row declares image input. A model rule now ships when the row has any of contextWindow, image input, or a selectable ladder; rows with none still ship none, per the no-guessed-capability rule. Effort filtering is shared with the legacy exporter via zcodeSelectableEfforts in model-metadata.
82255de to
fa95292
Compare
Summary
v2/provider_config.json([Bug]: ZCode 3.14 integration writes to the legacy provider file and is silently ineffective — injected models never appear #5348), and the store export (buildZcodeStoreContribution) carried over only each model rule'scontextWindow. The reasoning ladder that [Bug]: ZCode client config export omits reasoning configuration, preventing thought level controls in ZCode UI #4147/fix(zcode): export reasoning configuration for thought-capable models #4153 added to the legacyv2/config.jsonblock — and the catalog's declared image modality — were both silently dropped for every current ZCode build: opencodex models showed no thought-level picker and no attachment support.providerModelRulesentries:config.optionSpecs.reasoningLevel.values— the same Codex-vocabulary ladder the legacy block emits (minus thenonesentinel). With nomap, the client validates the chosen level againstvaluesand forwards it verbatim toreasoning.efforton theopenai-responsesapi type, which is exactly the vocabulary the proxy's/v1/responsesreads natively, so no mapping is emitted.config.properties.inputFormat.supportsImage— only when the catalog row declares image input; text-only rows keep the client's own defaults rather than being pinned tofalse.zcodeSelectableEffortsinmodel-metadata.ts, so both surfaces emit identical ladders.supportsJsonSchemaOutput/supportsNativeWebSearchare deliberately not written: neither the catalog nor the vendored metadata snapshot carries an authoritative signal for them (supports_search_toolis the Codex client-side web_search tool, a different semantic from the client's "interface-native search" checkbox), and guessing a capability the model lacks fails at call time instead of degrading gracefully.Verification
bun run typecheck— clean (re-run after rebasing onto dev tip4504a563).bun test tests/providers/zcode-client.test.ts— 17 pass, including 4 new regression tests: capabilities carried on a full row, text-only rows assert noinputFormat, a row without a context window still ships a rule when it has capabilities, and rows/audio-only rows with nothing to assert ship no rule.bun test tests/clients/integrations-current-store.test.ts tests/config/client-config-export.test.ts tests/clients/client-export-reasoning-controls.test.ts tests/clients/client-export-effective-metadata.test.ts tests/clients/client-export-modality-enum.test.ts tests/config/client-config-export-new-clients.test.ts tests/config/client-config-export-output-limit.test.ts tests/clients/mutation-plan.test.ts tests/clients/integrations-writer.test.ts tests/clients/integrations-merge.test.ts— 312 pass, 0 fail (4 skip), re-run on the rebased head.ocx zcode enableagainst the running proxy, and confirmed the written store carries the same ladders/image flags the Codex-side catalog declares for all 15 personal models (e.g.opencode-go/mimo-v2.6-pro→inputFormat.supportsImage: true,reasoningLevel.values: [low, medium, high, xhigh, max]). After a full client restart the thought-level picker and image attachments appear for opencodex models.bun run testnot run locally (suite scale disproportionate for this change); the focused suites above cover the touched serializer, its shared helper, the merge/ownership machinery, and the export surface. Remaining coverage left to required CI on the PR head.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.