## Summary
- add a Mintlify custom script that rewrites generated SDK API reference
schema labels from OpenAPI camelCase to SDK snake_case on Python and
Ruby pages
- keep code/pre/input/script/style content untouched so generated code
samples stay language-correct
- leave Java/Go/TypeScript routes unchanged for now
## Why
Mintlify renders these language-scoped API reference pages from the
Stainless documented OpenAPI spec, so visible schema labels use
wire-format camelCase even when the Python and Ruby SDK snippets use
snake_case.
## Validation
- `pnpm --dir packages/docs exec prettier --check
sdk-api-reference-labels.js`
- `node --check packages/docs/sdk-api-reference-labels.js`
- confirmed Mintlify embeds root-level docs JS by checking the existing
custom script in local/prod HTML and the new script in local HTML
- browser fixture served at `/v3/api-reference/{python,ruby,java}/...`:
Python/Ruby labels rewrote to snake_case, code blocks stayed camelCase,
and Java remained unchanged
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes mismatched parameter labels on Python and Ruby SDK API reference
pages by rewriting OpenAPI camelCase labels to SDK snake_case. Code
samples and inputs remain unchanged; other languages are unaffected.
- **Bug Fixes**
- Added `packages/docs/sdk-api-reference-labels.js` to relabel visible
schema fields for Python and Ruby only.
- Skips `code`, `pre`, `input`, `script`, `style`, and editable elements
to preserve language-correct snippets.
- Reacts to SPA route changes and DOM mutations to keep labels
consistent.
- Leaves Java/Go/TypeScript pages unchanged.
<sup>Written for commit ea143a674cc1a8b55cf39351506e93ecf0d70016.
Summary will update on new commits. <a
href="https://cubic.dev/pr/browserbase/stagehand/pull/2164?utm_source=github">Review
in cubic</a></sup>
<!-- End of auto-generated description by cubic. -->