Skip to content

ref(ai): Rename generate_text to text_completion#5885

Merged
ericapisani merged 1 commit intomasterfrom
ep/py-2268-14z
Mar 26, 2026
Merged

ref(ai): Rename generate_text to text_completion#5885
ericapisani merged 1 commit intomasterfrom
ep/py-2268-14z

Conversation

@ericapisani
Copy link
Copy Markdown
Member

Rename the gen_ai.generate_text span op to gen_ai.text_completion across the langchain and huggingface_hub integrations, aligning with updated naming conventions.

The constant OP.GEN_AI_GENERATE_TEXT is renamed to OP.GEN_AI_TEXT_COMPLETION, and all span names, operation name data, and test assertions are updated accordingly. The huggingface_hub integration derives its span description dynamically from the op string, so no additional changes were needed there beyond the op reference.

Refs PY-2268

Rename the gen_ai.generate_text span op to gen_ai.text_completion
across langchain and huggingface_hub integrations, aligning with
updated naming conventions.

Refs PY-2268
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 26, 2026

@github-actions
Copy link
Copy Markdown
Contributor

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

  • Always set gen_ai.response.streaming for Responses by alexander-alderman-webb in #5697
  • Simplify Responses input handling by alexander-alderman-webb in #5695
  • 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

Other

  • (google-genai) Guard response extraction by alexander-alderman-webb in #5869

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

Openai

  • Replace mocks with httpx types for streaming Responses by alexander-alderman-webb in #5882
  • Replace mocks with httpx types for streaming Completions by alexander-alderman-webb in #5879
  • Move input handling code into API-specific functions by alexander-alderman-webb in #5687

Other

  • (ai) Rename generate_text to text_completion by ericapisani in #5885
  • (asyncpg) Normalize query whitespace in integration by ericapisani in #5855
  • Exclude compromised litellm versions by alexander-alderman-webb in #5876
  • 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
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Codecov Results 📊

13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 13.51s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

❌ Patch coverage is 50.00%. Project has 14412 uncovered lines.
✅ Project coverage is 30.2%. Comparing base (base) to head (head).

Files with missing lines (3)
File Patch % Lines
langchain.py 3.25% ⚠️ 595 Missing
huggingface_hub.py 8.89% ⚠️ 164 Missing
consts.py 99.43% ⚠️ 2 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    25.30%    30.20%     +4.9%
==========================================
  Files          189       189         —
  Lines        20648     20648         —
  Branches      6760      6760         —
==========================================
+ Hits          5223      6236     +1013
- Misses       15425     14412     -1013
- Partials       429       474       +45

Generated by Codecov Action

@ericapisani
Copy link
Copy Markdown
Member Author

bugbot run

Copy link
Copy Markdown

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@ericapisani ericapisani marked this pull request as ready for review March 26, 2026 14:22
@ericapisani ericapisani requested a review from a team as a code owner March 26, 2026 14:22
Copy link
Copy Markdown
Contributor

@alexander-alderman-webb alexander-alderman-webb left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@ericapisani ericapisani merged commit 3debca0 into master Mar 26, 2026
159 checks passed
@ericapisani ericapisani deleted the ep/py-2268-14z branch March 26, 2026 15:16
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