Skip to content

fix(completions): include model field in API request body#16

Merged
lostmygithubaccount merged 1 commit intomainfrom
cody/fix-completions-model
Apr 5, 2026
Merged

fix(completions): include model field in API request body#16
lostmygithubaccount merged 1 commit intomainfrom
cody/fix-completions-model

Conversation

@lostmygithubaccount
Copy link
Copy Markdown
Member

Summary

  • Completions wire format build_request() was ignoring config.model, producing requests without the required model field
  • Added model to CompletionsRequest struct and populated it from config (with DEFAULT_MODEL fallback), matching Messages and Responses formats
  • Updated tests in both completions.rs and mod.rs to verify model is present

🤖 Generated with Claude Code

OpenAI's Chat Completions API requires the model field in the request
body. The Completions wire format was the only one missing it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lostmygithubaccount lostmygithubaccount enabled auto-merge (squash) April 5, 2026 23:57
@lostmygithubaccount lostmygithubaccount merged commit 1287d9f into main Apr 5, 2026
1 check passed
@lostmygithubaccount lostmygithubaccount deleted the cody/fix-completions-model branch April 5, 2026 23:58
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