fix(google): steer Google models away from unrendered LaTeX math formatting (carry of #3480) - #3544
Conversation
…atting
Google-family models (Gemini/Antigravity/Vertex) frequently wrap coordinates, dimensions, variables, and math in LaTeX math delimiters ($...$, ..., (...), ext{}, etc.). Because Codex Desktop renders standard Markdown without KaTeX support, these delimiters show up as raw unrendered LaTeX strings in chat output.
Include explicit client formatting guidance in GOOGLE_BREVITY_INSTRUCTION so Google models output clean Markdown, plain text, and Unicode symbols instead.
Co-authored-by: benedictusrey <74437942+benedictusrey@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Google adapter now instructs models to avoid LaTeX math delimiters and use plain text, Markdown, and Unicode symbols. A test verifies that the guidance appears in the generated system instruction. ChangesGoogle formatting guidance
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to Google-model responses will be guided toward Markdown, plain text, and Unicode rather than unrendered LaTeX delimiters. The focused regression coverage confirms the instruction is generated, with no current merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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. |
리뷰 · 우선순위 73 / 80설명 이 PR은 Google 계열 모델(Gemini / Vertex / Antigravity)이 채팅 답에 지금 현재 파일은 두 개뿐입니다. 원본 라인 44-48 - 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Ingwannu
left a comment
There was a problem hiding this comment.
Reviewed at exact head 368c5137a5e5760353cd57675df06fb8ebc91903.
The carry is bounded to the shared Google adapter instruction plus its focused regression. It tells Gemini/Vertex/Antigravity outputs to use plain Markdown and Unicode where Codex Desktop lacks KaTeX rendering, without changing wire conversion, tool calls, routing, or non-Google providers. The escaped instruction text is preserved correctly, and the test pins both the existing brevity contract and the new formatting clause.
Cross-platform CI run 33926622201 completed successfully on this exact SHA, including all Linux shards, both macOS shards, gates, storage/API-usage, keyring, and npm checks. CodeRabbit has no actionable finding. Approved.
|
Maintainer admin merge (ruleset bypass recorded per MAINTAINERS.md): carry of #3480, exact-head CI green on 368c513 (24 pass / 2 skipped / 0 fail). The single earlier macos 2/2 failure was tests/update/update-stop-first.test.ts readiness timeout (93s) in the update launcher — unreachable from this one-line google.ts prompt change — and passed on rerun of the same head. wp1 residual of the 260905 open-work closeout. |
Summary
Google models emit
$...$/\\[...\\]LaTeX in ordinary chat answers, which Codex renders as raw source. This carry appends a LaTeX-avoidance guidance line to the GooglesystemInstructioninsrc/adapters/google.ts, with the escape bug from the earlier review fixed on the author's rebased head74ef8faae(the CHANGES_REQUESTED review targets the superseded head4f5b05468).Supersedes #3480 (maintainer carry: original is a contributor draft whose readiness checklist would reset on any push; carry = PR head merged with
origin/dev).Stack (wp1 merge train, independent layers — each targets
dev):Unit:
devlog/_plan/260905_open_work_closeout/(010, 011).Verification
bun run typecheck— exit 0 on the carry head.bun test tests/adapters/google/google-adapter.test.ts— 33 pass / 0 fail.Checklist
devCo-authored-bytrailerCo-authored-by: benedictusrey 74437942+benedictusrey@users.noreply.github.com
Summary by CodeRabbit