Skip to content

feat(settings): add API Route provider preset - #172

Merged
Blankll merged 1 commit into
geek-fun:masterfrom
DennyHo0917:feat/api-route-provider
Oct 8, 2026
Merged

Blankll merged 1 commit into
geek-fun:masterfrom
DennyHo0917:feat/api-route-provider

Conversation

@DennyHo0917

Copy link
Copy Markdown
Contributor

Summary

Add API Route as a built-in preset in AI settings, following the small preset/changelog pattern from Requesty (#157) and Opper (#165).

  • Preset ID/kind: api-route; display name: API Route.
  • API compatibility: openai; base URL: https://global.api-route.com/v1.
  • Reuse the existing model discovery, connection validation, credential storage, and OpenAI-compatible transport.
  • Fix preset lookup when reopening an existing provider: match its exact kind first, then fall back to protocol compatibility for legacy entries. The previous combined predicate selected OpenAI before reaching later compatible presets.
  • Record both changes in the existing changelog.

I maintain API Route. This removes manual endpoint setup for its users while keeping the change limited to the existing settings flow. Two files changed; no dependencies or backend changes.

Verification

Rebased onto the latest master, including the newly merged Opper preset.

On Node 24:

  • npm run build: passed.
  • npm run test:ci: 32 suites, 582 tests passed.
  • npm run lint:check: passed.
  • npm audit --audit-level=critical: passed.
  • Evaluated the actual preset-selection expressions for all 15 preset IDs; exact-kind matching and the legacy OpenAI fallback passed.

Live gateway compatibility smoke checks: authenticated /models returned 60 IDs; a synthetic gpt-6.1-sol Chat Completions call returned SQLKIT_OK. This was an HTTP check, not a full Tauri end-to-end test. No database content or credentials are included in this PR.

Native Tauri launch and Rust/JDBC suites were not run locally for this frontend-only change.

Signed-off-by: dennyho0917 <dennyho0917@gmail.com>
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@da18dc9). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #172   +/-   ##
=========================================
  Coverage          ?   68.36%           
=========================================
  Files             ?       43           
  Lines             ?     2437           
  Branches          ?      599           
=========================================
  Hits              ?     1666           
  Misses            ?      595           
  Partials          ?      176           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Blankll
Blankll merged commit d572341 into geek-fun:master Oct 8, 2026
5 checks passed
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.

2 participants