Repository navigation
fix(ai): the openai provider without ai.api_base_url calls the OpenAI API's /v1 routes, built by the openai SDK - #2286
Merged
Conversation
dan-petty
marked this pull request as ready for review
October 26, 2026 04:34
… API's /v1 routes, built by the openai SDK The OpenAI provider without ai.api_base_url sent requests to the OpenAI API root without the /v1 path segment. This change: - Uses the openai SDK to route chat completions and model listings. - Configures the SDK client with the egress factory HTTP client. - Sets the default base URL to https://api.openai.com/v1 when ai.api_base_url is unset. - Preserves configured endpoints for GitHub Copilot and AI gateway. - Omits the Authorization header when ai.api_key is unset. - Limits response body size for stream and non-stream calls. - Removes legacy URL constants and hand-written payload parsers. Fail-to-pass evidence: 5 failed on base (5 failed and 147 passed in tests/test_ai_benchmark.py, tests/test_ai_client_providers_and_embeddings.py, tests/test_ai_model_sampling.py, tests/test_ai_streaming.py, tests/test_batch_2_review_defects.py, tests/test_thinking_providers.py; 0 errored). Verification: - uv run devops ci fail-to-pass --base origin/main - uv run devops ci - uv run devops openspec check Change: openspec/changes/archive/2026-10-26-1427-openai-provider-routes Closes #1427
dan-petty
force-pushed
the
fix/1427-openai-v1-routes
branch
from
October 26, 2026 12:52
2b34692 to
fbcc074
Compare
dan-petty
pushed a commit
that referenced
this pull request
Oct 26, 2026
🤖 I have created a release *beep* *boop* --- ## [0.6.2](v0.6.1...v0.6.2) (2026-10-26) ### Bug Fixes * **ai:** the claude provider sends what current Claude models accept, built by the anthropic SDK ([#2285](#2285)) ([59471a4](59471a4)) * **ai:** the openai provider without ai.api_base_url calls the OpenAI API's /v1 routes, built by the openai SDK ([#2286](#2286)) ([a7dd605](a7dd605)), closes [#1427](#1427) * **ci:** pin ty in the dev group so a new release cannot fail uv check on main ([#2284](#2284)) ([3936fe6](3936fe6)), closes [#2281](#2281) * **security:** query documented radar api with token and mark failed lookups unverified ([#2289](#2289)) ([c52af09](c52af09)) * **telemetry:** the project items gauge counts the items of the project board by milestone, state, type and priority ([#2290](#2290)) ([853296c](853296c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The OpenAI provider without
ai.api_base_urlpreviously sent requests to the OpenAI API root without the/v1path segment.This change:
openaiSDK to route chat completions and model listings.https://api.openai.com/v1whenai.api_base_urlis unset.ai.api_keyis unset.Fail-to-Pass Evidence
uv run devops ci fail-to-pass --base origin/mainpassed:Verification
uv run devops ci fail-to-pass --base origin/mainuv run devops ciuv run devops openspec checkChange:
openspec/changes/archive/2026-10-26-1427-openai-provider-routesCloses #1427