Skip to content

Add API Route as a built-in model provider - #464

Open
DennyHo0917 wants to merge 1 commit into
microsoft:devfrom
DennyHo0917:feat/api-route-provider
Open

DennyHo0917 wants to merge 1 commit into
microsoft:devfrom
DennyHo0917:feat/api-route-provider

Conversation

@DennyHo0917

Copy link
Copy Markdown

Summary

Add API Route as a built-in OpenAI-compatible model provider. Users can select API Route in the model picker, enter an API key and model ID, and use the default https://global.api-route.com/v1 endpoint. Model IDs are passed through unchanged.

  • Route API Route requests through LiteLLM's OpenAI-compatible provider.
  • Register api_route for server-configured models and model connection checks.
  • Include the gateway default in API base allowlist validation.
  • Document API_ROUTE_API_KEY, API_ROUTE_API_BASE, and API_ROUTE_MODELS in .env.template.

Testing

  • 23 targeted backend tests passed, including client routing, model registry, and default URL allowlist cases. On Windows, the test runner supplied Path.home() because existing patch.dict(..., clear=True) fixtures clear the home-directory environment variables.
  • ModelSelectionDialog.test.tsx: 58 passed.
  • tsc --noEmit: passed.
  • ESLint for ModelSelectionDialog.tsx: passed.

No live API request was made because no API Route credential was used.

@DennyHo0917

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant