Skip to content

feat: add API Route as an OpenAI-compatible provider alias - #4567

Open
DennyHo0917 wants to merge 1 commit into
docker:mainfrom
DennyHo0917:feat/api-route-provider
Open

DennyHo0917 wants to merge 1 commit into
docker:mainfrom
DennyHo0917:feat/api-route-provider

Conversation

@DennyHo0917

@DennyHo0917 DennyHo0917 commented Oct 11, 2026 •

Copy link
Copy Markdown

Summary

Add API Route as an opt-in OpenAI-compatible alias, following the Atlas Cloud (#3962) and DaoXE (#4246) patterns.

  • Register api-route with https://global.api-route.com/v1 and API_ROUTE_API_KEY.
  • Support automatic credential discovery/forwarding with gpt-6.1-sol as the default model.
  • Reuse the existing Chat Completions transport and consecutive-system-message handling.
  • Add a provider guide, navigation/table/schema entries, and a runnable code-assistant example.
  • Extend existing alias, auto-selection, system-message and hermetic/live transport tests.

API Route is absent from the embedded models.dev snapshot. The existing catalog-exemption mechanism is used without editing the generated snapshot. The guide explains the missing metadata and conservative attachment handling; no pricing, context-window or multimodal claims are added.

Validation

  • Windows build using the project's scripts/build.sh: passed.
  • Config/provider package tests: passed with the local HTTP proxy removed for the SSRF-address test.
  • Real request through TestOpenAIAliasProvider_LiveAPI/api-route: passed, streamed pong using gpt-6.1-sol.
  • Authenticated GET /v1/models: 57 IDs, including the exact default ID.
  • Real Chat Completions tool call: add with arguments {"a":2,"b":3}, finish_reason: tool_calls.
  • git diff --check: passed. Commit carries DCO sign-off and a GitHub-verified SSH signature.

go mod tidy --diff passed with no dependency changes. The full Windows suite did not pass in this environment: failures include HTTP-proxy interference with SSRF tests, unavailable symlink privileges/native tooling, and Windows path/Unix-fixture assumptions. The proxy-sensitive config failure and the reasoning-block path failure also reproduce on the unmodified base; all config/provider package tests pass after removing the proxy variables for that process. No claim of a full-suite pass is made.

Native golangci-lint reports four findings in unchanged Windows-only tests (pkg/sandbox/options_windows_test.go, pkg/hooks/helpers_windows_test.go); running the same linter on the unmodified base produces the identical four findings. Project cops report 23 Lint/OTelTracerName findings in unchanged source, comparing Windows backslashes in package paths against standard slash-separated import paths. These local platform limitations remain for upstream CI/maintainer verification.

Disclosure: I am affiliated with API Route. This contribution was prepared with AI assistance and reviewed before submission.

Signed-off-by: dennyho0917 <dennyho0917@gmail.com>
@aheritier aheritier added area/config For configuration parsing, YAML, environment variables area/docs Documentation changes area/providers/openai For features/issues/fixes related to the usage of OpenAI models kind/feat PR adds a new feature (maps to feat:). Use on PRs only. labels Oct 11, 2026
@DennyHo0917
DennyHo0917 marked this pull request as ready for review October 12, 2026 11:53
@DennyHo0917
DennyHo0917 requested a review from a team as a code owner October 12, 2026 11:53

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config For configuration parsing, YAML, environment variables area/docs Documentation changes area/providers/openai For features/issues/fixes related to the usage of OpenAI models kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants