Skip to content

fix(volcengine): remove duplicate camelCase keys in createSandbox/listSandboxes#175

Open
Ricardo-M-L wants to merge 1 commit intoagent-infra:mainfrom
Ricardo-M-L:fix/volcengine-duplicate-keys
Open

fix(volcengine): remove duplicate camelCase keys in createSandbox/listSandboxes#175
Ricardo-M-L wants to merge 1 commit intoagent-infra:mainfrom
Ricardo-M-L:fix/volcengine-duplicate-keys

Conversation

@Ricardo-M-L
Copy link
Copy Markdown

Summary

Fixes #174.

Both createSandbox and listSandboxes in sdk/js/src/providers/volcengine.ts build the JSON body by first explicitly mapping params.xxx to PascalCase keys, then spreading ...kwargs[0] on top — which re-adds every user-supplied camelCase key on top of its PascalCase equivalent.

This PR removes the redundant spread, so the JSON body only contains the PascalCase keys as intended.

Test plan

  • Added sdk/js/__test__/providers/volcengine.test.ts with 2 tests covering createSandbox and listSandboxes — verifies PascalCase keys are present and camelCase keys are absent from the serialized body.

Related

This is part of splitting closed PR #167 into focused single-bug PRs. Bugs 1 (#171) and 2 (#173) are already open individually. This PR handles Bug 3.

🤖 Generated with Claude Code

…tSandboxes JSON body

Both createSandbox and listSandboxes explicitly map snake_case parameter
fields to PascalCase body keys (e.g. cpuMilli -> CpuMilli, pageSize ->
PageSize), then spread `...kwargs[0]` on top. The spread re-adds the
original camelCase keys, producing a JSON body that contains both
PascalCase and camelCase duplicates for every user-supplied field.
Removed the redundant spread so the body only contains the explicitly
mapped PascalCase keys as intended.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Volcengine provider: createSandbox/listSandboxes produce duplicate PascalCase+camelCase keys in JSON body

1 participant