Commit Graph

3 Commits

Author SHA1 Message Date
southseact-3d
25367847ed feat: add OpenRouter provider preference support
Implement provider preference feature for OpenRouter models:

1. Database Schema:
   - Add ModelProviderPreferenceTable to store provider preferences per model

2. Console Core API:
   - Add ProviderPreferenceSchema for validation
   - Add setProviderPreference(), getProviderPreference(), deleteProviderPreference(), and listProviderPreferences() functions

3. Request Handler:
   - Modify handler.ts to fetch provider preferences from database
   - Pass provider preferences to OpenRouter in request body

4. Admin UI:
   - Add provider preference dropdown for OpenRouter models in model-section.tsx
   - Add 'Allow fallbacks' checkbox for fallback control
   - Add corresponding CSS styles

5. CLI Config:
   - Add providerPreference field to Provider model config schema
   - Support configuring provider preferences via opencode.json

6. Provider SDK:
   - Inject provider preferences into OpenRouter request body in fetch wrapper

This allows workspace admins to specify preferred providers for OpenRouter
models, ensuring models like Claude route through specific providers
(e.g., Anthropic direct) rather than third-party providers.
2026-02-19 14:18:58 +00:00
dependabot[bot]
bbc7daff39 Bump the npm_and_yarn group across 3 directories with 4 updates
Bumps the npm_and_yarn group with 1 update in the /opencode/packages/console/app directory: [wrangler](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler).
Bumps the npm_and_yarn group with 1 update in the /opencode/packages/opencode directory: [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk).
Bumps the npm_and_yarn group with 2 updates in the /opencode/packages/web directory: [@astrojs/cloudflare](https://github.com/withastro/astro/tree/HEAD/packages/integrations/cloudflare) and [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro).


Updates `wrangler` from 4.50.0 to 4.59.1
- [Release notes](https://github.com/cloudflare/workers-sdk/releases)
- [Commits](https://github.com/cloudflare/workers-sdk/commits/wrangler@4.59.1/packages/wrangler)

Updates `@modelcontextprotocol/sdk` from 1.25.2 to 1.26.0
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/v1.25.2...v1.26.0)

Updates `@astrojs/cloudflare` from 12.6.3 to 12.6.6
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/integrations/cloudflare/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/@astrojs/cloudflare@12.6.6/packages/integrations/cloudflare)

Updates `astro` from 5.7.13 to 5.15.9
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.15.9/packages/astro)

---
updated-dependencies:
- dependency-name: wrangler
  dependency-version: 4.59.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: "@modelcontextprotocol/sdk"
  dependency-version: 1.26.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@astrojs/cloudflare"
  dependency-version: 12.6.6
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: astro
  dependency-version: 5.15.9
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-08 09:46:02 +00:00
southseact-3d
efda260214 Vendor opencode source for docker build 2026-02-07 20:54:46 +00:00