Skip to content

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

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

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

Conversation

@DennyHo0917

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.

The full Windows suite and project cops are still running locally; results will be updated before this draft is marked ready. Native golangci-lint reports four findings in unchanged Windows-only tests (pkg/sandbox/options_windows_test.go, pkg/hooks/helpers_windows_test.go); a baseline comparison is in progress.

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

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