feat(provider): add RunInfra support - #2223
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughRunInfra is added as a disabled OpenAI-compatible provider with API-key authentication and no embedding support. Its model icon is registered. Tests cover model discovery and API-key validation. ChangesRunInfra provider integration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR adds a localized built-in RunInfra provider profile, model discovery, authentication handling, and themed branding with validation in place. No actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant ProviderTest
participant ProviderRegistry
participant RunInfraAPI
ProviderTest->>ProviderRegistry: resolve runinfra
ProviderTest->>RunInfraAPI: request /v1/models with API key
RunInfraAPI-->>ProviderTest: return models or 401
ProviderTest->>ProviderRegistry: check API key result
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4 files. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
zerob13
left a comment
There was a problem hiding this comment.
Review verdict: APPROVED (comment — self-PR cannot be formally approved)
Reviewed head fffbfa01a14dc581751498e22a6d634fbc8756ff (5 files, +87/−0, merge-base diff vs dev).
Checks
- Pattern conformance: exact template used by recently merged provider additions (e.g. #2215 Synthorai) —
defaults.tsentry (disabled built-in,openai-completions, baseUrl + websites metadata),providerRegistry.tsid-mapping (OPENAI_BASE+credentialStrategy: 'api-key',embeddingStrategy: 'none', consistent with 31 other no-embedding entries), icon asset +modelIconRegistrycolor/mono registration. - RunInfra is already present in
resources/model-db/providers.json(auto-refreshed catalog), so the built-in defaults entry and the public model DB now align — no schema drift. - Tests: appropriate, not excessive — one focused test covering model discovery via the OpenAI-compatible endpoint,
fetchModelsresult shape,check()success + 401 error path, andAuthorization: Bearerheader. Mirrors the existing per-provider test granularity. - Verification on PR branch:
basicApiKeyProviders.test.ts21/21 passed;oxfmt --checkandpnpm lintclean.typecheckfailures are the pre-existingmarkstream-vue/markdownWorkerLifecycle.tsrenderer errors on currentdev, unrelated to this PR. - No over-engineering, no breaking changes, no UI-visible behavior change (provider stays
enable: falseuntil user opts in).
Nothing to change. Ship it.
RunInfra users currently need a custom provider profile. This PR adds a built-in
runinfraprofile with the official workspace API endpoint and logo.AiSdkProviderwith the OpenAI-compatible Chat Completions transport athttps://api.runinfra.ai/v1; no new adapter or dependency.GET /v1/models, without generating billable inference. API keys use existing main-process provider storage.Validation passed:
pnpm run formatandpnpm run format:checkpnpm run i18npnpm run lintpnpm run typecheckAPI contract: RunInfra quickstart and model discovery.
Summary by CodeRabbit
New Features
Tests