Skip to content

fix(openai): Simplify Completions input handling#5690

Merged
alexander-alderman-webb merged 9 commits intomasterfrom
webb/openai/completions-input
Mar 26, 2026
Merged

fix(openai): Simplify Completions input handling#5690
alexander-alderman-webb merged 9 commits intomasterfrom
webb/openai/completions-input

Conversation

@alexander-alderman-webb
Copy link
Contributor

@alexander-alderman-webb alexander-alderman-webb commented Mar 18, 2026

Description

Replace set_data_normalized with set_data for parameters declared to have primitive types.

https://github.com/openai/openai-python/blob/acd0c54d8a68efeedde0e5b4e6c310eef1ce7867/src/openai/resources/completions.py#L52

Stop checking for sentinel values when setting the request model, because the model is required.

Issues

Reminders

@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Langchain

  • Set gen_ai.operation.name and gen_ai.pipeline.name on LLM spans by ericapisani in #5849
  • Broaden AI provider detection beyond OpenAI and Anthropic by ericapisani in #5707
  • Update LLM span operation to gen_ai.generate_text by ericapisani in #5796

Bug Fixes 🐛

Ci

  • Use gh CLI to convert PR to draft by stephanie-anderson in #5874
  • Use GitHub App token for draft PR enforcement by stephanie-anderson in #5871

Openai

  • Simplify Completions input handling by alexander-alderman-webb in #5690
  • Simplify embeddings input handling by alexander-alderman-webb in #5688

Internal Changes 🔧

Langchain

  • Add text completion test by alexander-alderman-webb in #5740
  • Add tool execution test by alexander-alderman-webb in #5739
  • Add basic agent test with Responses call by alexander-alderman-webb in #5726
  • Replace mocks with httpx types by alexander-alderman-webb in #5724
  • Consolidate span origin assertion by alexander-alderman-webb in #5723
  • Consolidate available tools assertion by alexander-alderman-webb in #5721

Other

  • (asyncpg) Normalize query whitespace in integration by ericapisani in #5855
  • (openai) Move input handling code into API-specific functions by alexander-alderman-webb in #5687
  • Add note to coordinate with assignee before PR submission by sentrivana in #5868
  • Temporarily stop running litellm tests by alexander-alderman-webb in #5851

Other

  • ci+docs: Add draft PR enforcement by stephanie-anderson in #5867

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

Codecov Results 📊

12 passed | Total: 12 | Pass Rate: 100% | Execution Time: 2.07s

All tests are passing successfully.

❌ Patch coverage is 0.00%. Project has 14089 uncovered lines.

Files with missing lines (1)
File Patch % Lines
openai.py 4.60% ⚠️ 602 Missing

Generated by Codecov Action

@alexander-alderman-webb alexander-alderman-webb marked this pull request as ready for review March 25, 2026 08:17
@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner March 25, 2026 08:17
Base automatically changed from webb/openai/remove-common-input-data to master March 26, 2026 07:53
@alexander-alderman-webb alexander-alderman-webb merged commit 5c970e7 into master Mar 26, 2026
159 checks passed
@alexander-alderman-webb alexander-alderman-webb deleted the webb/openai/completions-input branch March 26, 2026 08:56
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.

2 participants