Skip to content

fix(openai): Use max_output_tokens for Responses API#5693

Merged
alexander-alderman-webb merged 10 commits intomasterfrom
webb/openai/responses-input
Mar 26, 2026
Merged

fix(openai): Use max_output_tokens for Responses API#5693
alexander-alderman-webb merged 10 commits intomasterfrom
webb/openai/responses-input

Conversation

@alexander-alderman-webb
Copy link
Contributor

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

Description

Use the declared parameter for maximum output tokens.

https://github.com/openai/openai-python/blob/acd0c54d8a68efeedde0e5b4e6c310eef1ce7867/src/openai/resources/responses/responses.py#L113

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

  • Use max_output_tokens for Responses API by alexander-alderman-webb in #5693
  • Always set gen_ai.response.streaming for Completions by alexander-alderman-webb in #5692
  • 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
  • Reactivate litellm tests by alexander-alderman-webb in #5853
  • 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 📊

6 passed | ⏭️ 1 skipped | Total: 7 | Pass Rate: 85.71% | Execution Time: 913ms

All tests are passing successfully.

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

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

Generated by Codecov Action

@alexander-alderman-webb alexander-alderman-webb marked this pull request as ready for review March 25, 2026 08:21
@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner March 25, 2026 08:21
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

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 09728a5 into master Mar 26, 2026
158 checks passed
@alexander-alderman-webb alexander-alderman-webb deleted the webb/openai/responses-input branch March 26, 2026 09:28
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