Repository navigation
feat: add API Route AI provider - #203
Open
DennyHo0917 wants to merge 1 commit into
Open
DennyHo0917 wants to merge 1 commit into
DennyHo0917 wants to merge 1 commit into
Conversation
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
Add API Route as a built-in AI provider, following the OpenAI-compatible path used by Opper (#202) and Requesty.
https://global.api-route.com/v1and discover models with authenticatedGET /models.The user supplies their own API key. Existing secret storage, custom base URL support, and database tool approval behavior are reused.
Verification
pnpm exec oxfmt --checkon the four changed files: passed.pnpm run build:web(TypeScript check and Vite production build): passed.@ai-sdk/openai-compatibleandaidependencies withclaude-haiku-4-5: completionOK, streamedSELECT 1, and a structuredrunSQLQuerytool call with{"sql":"SELECT 1"}. The smoke test did not execute SQL.git diff --check: passed.Validation ran on Windows with Node 24; the repository declares Node 26. I have not built or manually tested the native Tauri application.
Manual check
Open Settings > AI Providers, add API Route, enter a key from API Keys, fetch models, and select a supported chat model. SQL assistance should use that model through the existing chat workflow.
Service setup and billing: quickstart, pricing. API Route is a paid hosted service.
Disclosure: I maintain API Route. This change was prepared with AI assistance and verified against the live service. Happy to adjust to the project's preferred provider conventions.