Skip to content

feat(attributes): Add gen_ai.request.reasoning_effort attribute#334

Draft
cleptric wants to merge 3 commits into
mainfrom
feat/gen-ai-reasoning-effort
Draft

feat(attributes): Add gen_ai.request.reasoning_effort attribute#334
cleptric wants to merge 3 commits into
mainfrom
feat/gen-ai-reasoning-effort

Conversation

@cleptric
Copy link
Copy Markdown
Member

@cleptric cleptric commented Apr 22, 2026

Just making this as a draft for now.


Adds gen_ai.request.reasoning_effort for tracking the reasoning effort parameter on reasoning-capable models.

Supported values vary by provider:

  • OpenAI: minimal, low, medium, high (plus none on GPT-5.2 and xhigh on GPT-5.3-Codex / 5.1-Codex-Max)
  • Anthropic: low, medium, high (Claude 4.6+ effort parameter)
  • Google Gemini 3: low, high (thinking_level)

Not in OpenTelemetry semantic conventions.

Adds a new attribute for tracking the reasoning effort parameter sent
to reasoning-capable models. Supported values vary by provider (OpenAI,
Anthropic, Google Gemini), so the brief documents per-provider levels
rather than a fixed enum. Not in OTel.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cleptric cleptric requested review from a team, Lms24, lcian, mjq and nsdeschenes as code owners April 22, 2026 17:15
@cleptric cleptric marked this pull request as draft April 22, 2026 17:16
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 22, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 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 ✨

  • (attributes) Add gen_ai.request.reasoning_effort attribute by cleptric in #334

🤖 This preview updates automatically when you update the PR.

// Path: model/attributes/gen_ai/gen_ai__request__reasoning_effort.json

/**
* Constrains the effort on reasoning for reasoning models. Supported values vary by provider: OpenAI supports `minimal`, `low`, `medium`, `high` (and `none`, `xhigh` on newer models); Anthropic supports `low`, `medium`, `high`; Google Gemini 3 supports `low`, `high`. `gen_ai.request.reasoning_effort`
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.

Not sure how useful the per-provider enumeration is since it's model dependent and the current list is not completely accurate, e.g., Gemini has minimal and medium as well.

https://ai.google.dev/gemini-api/docs/thinking

Suggested change
* Constrains the effort on reasoning for reasoning models. Supported values vary by provider: OpenAI supports `minimal`, `low`, `medium`, `high` (and `none`, `xhigh` on newer models); Anthropic supports `low`, `medium`, `high`; Google Gemini 3 supports `low`, `high`. `gen_ai.request.reasoning_effort`
* Selects how much reasoning, or internal thinking, the model performs before responding. `gen_ai.request.reasoning_effort`

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