Skip to content

Use precise invocation types across DSPy, Smolagents, OpenAI Agents, and OpenAI - #706

Merged
lmolkova merged 1 commit into
open-telemetry:mainfrom
lmolkova:precise-invocation-types
Sep 13, 2026
Merged

lmolkova merged 1 commit into
open-telemetry:mainfrom
lmolkova:precise-invocation-types

Conversation

@lmolkova

Copy link
Copy Markdown
Member

Replaces generic GenAIInvocation and AgentInvocation with concrete invocation types (LocalAgentInvocation, InferenceInvocation, WorkflowInvocation, ToolInvocation) across DSPy, Smolagents, OpenAI Agents, and OpenAI. Replaces the private import from opentelemetry.util.genai._invocation in OpenAI response wrappers with public imports.

@lmolkova lmolkova added the Skip Changelog PR does not require a changelog entry label Sep 13, 2026
@lmolkova
lmolkova requested a balanced review from Copilot September 13, 2026 21:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The annotations align with handler return types and introduce no behavioral regressions.

Pull request overview

Refines invocation type annotations across four instrumentations without changing runtime behavior.

Changes:

  • Replaces generic invocation annotations with concrete operation types.
  • Uses public util-genai invocation imports in OpenAI response wrappers.
File summaries
File Description
smolagents/patch.py Narrows completion helper types.
openai/response_wrappers.py Uses public, concrete response invocation types.
openai_agents/processor.py Narrows stored invocation types.
dspy/patch.py Uses LocalAgentInvocation for local agents.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@lmolkova
lmolkova marked this pull request as ready for review September 13, 2026 21:55
@lmolkova
lmolkova requested a review from a team as a code owner September 13, 2026 21:55
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-09-17 06:33 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@lmolkova
lmolkova added this pull request to the merge queue Sep 13, 2026
Merged via the queue into open-telemetry:main with commit b995901 Sep 13, 2026
75 of 76 checks passed
@lmolkova
lmolkova deleted the precise-invocation-types branch September 13, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PR does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants