Skip to content

feat(provider): add Straico as a built-in OpenAI-compatible provider#2001

Merged
zhangmo8 merged 1 commit into
ThinkInAIXYZ:devfrom
Solaris-star:feat/straico-provider
Jul 20, 2026
Merged

feat(provider): add Straico as a built-in OpenAI-compatible provider#2001
zhangmo8 merged 1 commit into
ThinkInAIXYZ:devfrom
Solaris-star:feat/straico-provider

Conversation

@Solaris-star

@Solaris-star Solaris-star commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Straico as a built-in provider preset (issue #959).

Straico exposes an OpenAI-compatible surface on https://api.straico.com/v2, so this follows the same path as OpenRouter / Routerra / OpenCode Go:

  1. DEFAULT_PROVIDERS entry in src/main/provider/defaults.ts (apiType: 'openai-completions', enable: false)
  2. Brand icon at src/renderer/src/assets/llm-icons/straico.svg
  3. Registry wiring in modelIconRegistry.ts

Scope

Intentionally preset-only for the first landing (chat/completions + models via the existing OpenAI-compatible stack). Native Straico-only surfaces (RAG / Agents / video / TTS) can be separate follow-ups.

Test plan

  • App loads with Straico listed among providers (disabled by default)
  • Enabling + API key + model list against https://api.straico.com/v2 works for chat completions

Closes #959.

Summary by CodeRabbit

  • New Features
    • Added Straico as a supported default AI provider.
    • Added Straico provider details, documentation links, and model access configuration.
    • Added a dedicated Straico icon for clearer provider and model identification.

Register Straico v2 OpenAI-compatible API as a default provider preset
with brand icon, following OpenRouter/Routerra pattern. Disabled by default.

Closes ThinkInAIXYZ#959.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds Straico as a default OpenAI-compatible provider with API metadata and website links, and registers its model icon for renderer resolution.

Changes

Straico integration

Layer / File(s) Summary
Default provider configuration
src/main/provider/defaults.ts
Adds Straico with its provider ID, OpenAI-compatible API type, v2 base URL, and related website URLs.
Model icon registration
src/renderer/src/components/icons/modelIconRegistry.ts
Imports the Straico icon and maps the straico provider key to it, extending ModelIconKey.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: zerob13

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding Straico as a built-in OpenAI-compatible provider.
Linked Issues check ✅ Passed The PR adds the Straico provider preset and icon wiring requested for the initial integration scope.
Out of Scope Changes check ✅ Passed Only Straico provider and icon registry updates were added, which are directly related to the feature request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/provider/defaults.ts`:
- Around line 392-399: Update the Straico runtime URL construction in the
relevant provider runtime logic to preserve the configured /v2 base path and
avoid appending /v1. Ensure chat and model requests use Straico’s documented
/v2/chat and /v2/models routes, while leaving other providers’ URL behavior
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2a3e6de1-da5d-46de-b3af-b9de4ab5060f

📥 Commits

Reviewing files that changed from the base of the PR and between 3464d91 and c01c4a6.

⛔ Files ignored due to path filters (1)
  • src/renderer/src/assets/llm-icons/straico.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • src/main/provider/defaults.ts
  • src/renderer/src/components/icons/modelIconRegistry.ts

Comment on lines +392 to +399
baseUrl: 'https://api.straico.com/v2',
enable: false,
websites: {
official: 'https://www.straico.com/',
apiKey: 'https://platform.straico.com/settings-api',
docs: 'https://documenter.getpostman.com/view/5900072/2s9YyzddrR',
models: 'https://api.straico.com/v2/models',
defaultBaseUrl: 'https://api.straico.com/v2'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Preserve Straico’s /v2 base path in runtime URL construction.

src/main/provider/aiSdk/runtime.ts:810-817 appends /v1 to this preset’s baseUrl, which turns https://api.straico.com/v2 into /v2/v1 and breaks chat/model requests. Keep Straico on its documented /v2/chat and /v2/models routes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/provider/defaults.ts` around lines 392 - 399, Update the Straico
runtime URL construction in the relevant provider runtime logic to preserve the
configured /v2 base path and avoid appending /v1. Ensure chat and model requests
use Straico’s documented /v2/chat and /v2/models routes, while leaving other
providers’ URL behavior unchanged.

@zhangmo8

Copy link
Copy Markdown
Collaborator

thinks for your contribution

@zhangmo8
zhangmo8 merged commit 9003ae5 into ThinkInAIXYZ:dev Jul 20, 2026
4 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.

[Feature] Add Straico as AI Provider

2 participants