Skip to content

ref(agents): Simplify OpenAI provider for gateway compatibility - #724

Merged
dcramer merged 2 commits into
mainfrom
feat/openai-compatible-provider
Jan 21, 2026
Merged

dcramer merged 2 commits into
mainfrom
feat/openai-compatible-provider

Conversation

@dcramer

@dcramer dcramer commented Jan 19, 2026 •

Copy link
Copy Markdown
Member

Remove reasoningEffort parameter from OpenAI provider - this was only
applicable to o1/o3 reasoning models and could cause issues with
OpenAI-compatible gateways that don't support it.

Kept the critical settings that ensure compatibility:

Added integration test that actually calls searchIssuesAgent with real
OpenAI API (unlike unit tests which mock AI SDK, or evals which don't execute
tool handlers). The test:

This fills a testing gap:

  • Evals: Test outer LLM tool prediction (never execute handlers)
  • Unit tests: Mock the AI SDK entirely
  • New integration tests: Actually run embedded agents with real OpenAI

Usage with gateways:

sentry-mcp --openai-base-url=https://gateway.ai.vercel.com/v1
OPENAI_MODEL=openai/gpt-4o  # if gateway expects different format

@dcramer
dcramer force-pushed the feat/openai-compatible-provider branch 2 times, most recently from e36d041 to 972afb8 Compare January 19, 2026 18:35
cursor[bot]

This comment was marked as outdated.

Remove reasoningEffort parameter from OpenAI provider - this was only
applicable to o1/o3 reasoning models and could cause issues with
OpenAI-compatible gateways that don't support it.

Keep the critical settings that ensure compatibility:
- structuredOutputs: false (required for nullable fields, fixes #623)
- temperature: 1 (required by GPT-5, AI SDK defaults to 0)

Add integration test that verifies the provider configuration works
correctly with real OpenAI API calls (skipped when OPENAI_API_KEY not set).

Co-Authored-By: Claude <noreply@anthropic.com>
@dcramer
dcramer force-pushed the feat/openai-compatible-provider branch from 972afb8 to 4b013c6 Compare January 19, 2026 18:43

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

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

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Addresses bugbot feedback: the integration test only checked for
OPENAI_API_KEY but didn't explicitly configure the OpenAI provider.
Since auto-detect prefers Anthropic when both keys are set, the test
could inadvertently use the wrong provider.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dcramer
dcramer merged commit 164c64f into main Jan 21, 2026
13 checks passed
@dcramer
dcramer deleted the feat/openai-compatible-provider branch January 21, 2026 18:43
@dcramer
dcramer restored the feat/openai-compatible-provider branch January 21, 2026 18:54
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.

0.20.0 fails to communicate to the api due to missing query (self hosted)

1 participant