Skip to content

fix: preserve model_usage keys from case conversion#72

Merged
PennyroyalTea merged 2 commits into
mainfrom
bs/fix-model-usage-case-conversion
Apr 3, 2026
Merged

fix: preserve model_usage keys from case conversion#72
PennyroyalTea merged 2 commits into
mainfrom
bs/fix-model-usage-case-conversion

Conversation

@PennyroyalTea
Copy link
Copy Markdown
Collaborator

@PennyroyalTea PennyroyalTea commented Apr 3, 2026

Summary

  • Model name keys under model_usage (e.g. gpt_5.2, gpt-4o-mini, gemini-2.5-flash) are user-defined identifiers, not schema fields
  • The case conversion logic was mangling them during test push (gpt_5.2 -> gpt5.2, gpt-4o-mini -> gpt4oMini), causing 422 validation errors
  • Added model_usage / modelUsage to PRESERVE_CHILD_KEYS in src/shared/utils.ts, following the same pattern used for language_presets, dynamic_variables, nodes, and edges

Test plan

  • Added unit test: preserve model_usage keys in toCamelCaseKeys
  • Added unit test: preserve modelUsage keys in toSnakeCaseKeys
  • Added unit test: round-trip conversion symmetry for model_usage
  • All 46 utils tests pass
  • Manual test: elevenlabs tests push with config containing model_usage keys

🤖 Generated with Claude Code

PennyroyalTea and others added 2 commits April 3, 2026 16:37
Model name keys (e.g. gpt_5.2, gpt-4o-mini, gemini-2.5-flash) under
model_usage are user-defined identifiers, not schema fields. The case
conversion was mangling them (gpt_5.2 -> gpt5.2, gpt-4o-mini -> gpt4oMini),
causing 422 validation errors on test push.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@PennyroyalTea PennyroyalTea merged commit 12447ac into main Apr 3, 2026
4 checks passed
@PennyroyalTea PennyroyalTea deleted the bs/fix-model-usage-case-conversion branch April 3, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant