feat(bridge): native-vision skip guard + configurable describe output cap - #10289
Merged
Conversation
Add the "Max description characters" field to the Vision tab's Advanced panel (modalityBridgeVisionMaxChars, clamped to the 100-50000 schema range with 0 treated as the explicit "unlimited" sentinel), wire the en.json copy and sync it across all 42 locales, and document the new setting in GUARDRAILS.md.
updateSettingsSchema previously rejected modalityBridgeVisionMaxChars: 0 because the field's range was min(100).max(50000), so a dashboard PATCH sending the explicit "unlimited" sentinel would 400. Widen the schema to z.union([z.literal(0), z.number().int().min(100).max(50000)]) so 0 validates as its own valid value, not just an implicit default.
…e-vision-skip-maxchars # Conflicts: # src/i18n/messages/ar.json # src/i18n/messages/az.json # src/i18n/messages/bg.json # src/i18n/messages/bn.json # src/i18n/messages/cs.json # src/i18n/messages/da.json # src/i18n/messages/de.json # src/i18n/messages/es.json # src/i18n/messages/fa.json # src/i18n/messages/fi.json # src/i18n/messages/fr.json # src/i18n/messages/gu.json # src/i18n/messages/he.json # src/i18n/messages/hi.json # src/i18n/messages/hu.json # src/i18n/messages/id.json # src/i18n/messages/in.json # src/i18n/messages/it.json # src/i18n/messages/ja.json # src/i18n/messages/ko.json # src/i18n/messages/mr.json # src/i18n/messages/ms.json # src/i18n/messages/nl.json # src/i18n/messages/no.json # src/i18n/messages/phi.json # src/i18n/messages/pl.json # src/i18n/messages/pt.json # src/i18n/messages/ro.json # src/i18n/messages/ru.json # src/i18n/messages/sk.json # src/i18n/messages/sv.json # src/i18n/messages/sw.json # src/i18n/messages/ta.json # src/i18n/messages/te.json # src/i18n/messages/th.json # src/i18n/messages/tr.json # src/i18n/messages/uk-UA.json # src/i18n/messages/ur.json # src/i18n/messages/zh-CN.json # src/i18n/messages/zh-TW.json
…e-vision-skip-maxchars
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR-C of the OCR/image-to-text migration series (plan:
_tasks/superpowers/plans/2026-08-13-ocr-image-to-text-migration.md; patterns migrated from openclaw-zero-token's vision-skip + configurable describe limits).tests/unit/vision-bridge-native-skip.test.ts): permanent regression test proving that when the target model supports vision natively the bridge leaves messages untouched and makes zero vision-model calls — plus a dedicatedSkipping: target model supports vision nativelylog at the capability early-return (the only production change of C1).modalityBridgeVisionMaxChars— configurable cap on the vision model's description output ("raise for detail-heavy OCR tasks, cap for terse contexts"):z.union([z.literal(0), z.number().int().min(100).max(50000)]).optional()—0is the explicit "no cap" sentinel, so an operator can always turn the cap back off (gap caught in review and fixed in-series).visionMaxChars: 0inMODALITY_BRIDGE_DEFAULTS,maxCharsonVisionBridgeRuntimeSettings.[Image N]:text — cached descriptions are stored raw and re-capped at read time, so changing the cap re-applies to cache hits.i18n:sync-ui --translate-markers, docs row inGUARDRAILS.md.Note for the merger: the mandated i18n sync also back-translated ~7 pre-existing unrelated
__MISSING__markers (thinkingMode*family, mostly inpt.json/zh-TW.json) and deduped a stale block — translation-only churn that pays existing i18n debt and raises the coverage ratchet; no hand edits outside this PR's keys.Validation (TDD)
vision-bridge-native-skip1/1 ·vision-bridge-maxchars5/5 (incl. explicit-0 no-truncation and 50-rejected) · UImodality-bridge-vision-tab6/6 (asserts the PATCH body carriesmodalityBridgeVisionMaxChars: 2000; pre-existing cases untouched).vision-bridge-mode4/4,task-aware5/5,modality-bridge-settings,cc-no-reroute8/8,settings-schema2/2,describe-cache3/3.typecheck:core0 · eslint/prettier clean ·check:docs-all0 · zero__MISSING__for the new keys across 42 locales.database is locked(shared temp DATA_DIR across parallel test processes — environmental); each file is green in isolation, and CI shards run them separately.