Skip to content

feat: forward provider options from model config#202

Merged
thdxr merged 3 commits into
anomalyco:devfrom
0ximjosh:feat/provider-options
Jun 20, 2025
Merged

feat: forward provider options from model config#202
thdxr merged 3 commits into
anomalyco:devfrom
0ximjosh:feat/provider-options

Conversation

@0ximjosh
Copy link
Copy Markdown
Contributor

@0ximjosh 0ximjosh commented Jun 19, 2025

Allows users to forward providerOptions to Vercel's ai package. This is
particularly useful for openrouter when needing to select specific providers.

This allows the user to follow the documentation on providerOptions 1:1 with a
given providers sdk.

Example

Following this documentation for adding provider options to the body of a request, we can use
the following opencode.json to select a specific provider

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "openrouter": {
      "npm": "@openrouter/ai-sdk-provider",
      "name": "OpenRouter",
      "options": {},
      "models": {
        "deepseek/deepseek-r1:free": {
          "tools": false,
          "id": "deepseek/deepseek-r1:free",
          "name": "DeepSeek: R1 (free)",
          "providerOptions": {
            "openrouter": {
              "provider": {
                "allow_fallbacks": false,
                "only": [
                  "targon"
                ]
              }
            }
          }
        }
      }
    }
  }
}

Notes

I added the tools field to the model info as an optional bool, since
openrouter providers may or may not support tools (in my case, Targon does not
yet support tool calling), so this needs to be dynamic per model. Maybe it makes
sense to name this something closer to disableTools?

Closes #186

@thdxr
Copy link
Copy Markdown
Member

thdxr commented Jun 19, 2025

nice - should we just call this options the same way we have options on the provider?

@0ximjosh
Copy link
Copy Markdown
Contributor Author

that makes sense to me. I'll update it accordingly.

@0ximjosh
Copy link
Copy Markdown
Contributor Author

this should be ready to go

@thdxr
Copy link
Copy Markdown
Member

thdxr commented Jun 20, 2025

models.dev is tracking tool_call now so i matched the field - let the option field be simplified

@thdxr thdxr merged commit 9991352 into anomalyco:dev Jun 20, 2025
achembarpu pushed a commit to achembarpu/opencode that referenced this pull request Aug 4, 2025
andreipromarketing-dev pushed a commit to andreipromarketing-dev/opencode that referenced this pull request Apr 7, 2026
…o#202)

* docs(zh-CN): sync Chinese docs with latest upstream changes

* docs: improve Chinese translation consistency in go-test.md

* docs(zh-CN): update image paths to use shared assets directory

- Update image references from ./assets/ to ../../assets/
- Remove zh-CN/assets directory to use shared assets

---------

Co-authored-by: neo <neo.dowithless@gmail.com>
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
bussard76 pushed a commit to bussard76/openwork that referenced this pull request May 12, 2026
bussard76 pushed a commit to bussard76/openwork that referenced this pull request May 12, 2026
* feat(ui): display agent status in session sidebar

- Update SessionView to accept sessionStatusById prop
- Render status pill in session list sidebar
- Pass status from App component to SessionView
- Fix type errors in demo-state mocks

* feat(ui): add chat visualization enhancements

- Add 'flow' animation for new tasks, artifacts, and files moving to sidebar
- Add minimalist jump rail to navigate between Agent and User messages
- Add copy button to message bubbles
- Add OnePlus-inspired colors for User interactions

* feat(ui): implement fine-grained message minimap rail

- Replaces simple jump buttons with a minimap rail showing individual message lines
- Uses #EB0029 for user messages and theme-inverse for agent messages
- Implements active state highlighting and hover expansion effects
- Adds click-to-scroll navigation for each message line

* style(ui): redesign minimap rail to horizontal bars with premium feel

- Change lines from vertical to horizontal dashes
- Remove rail border for cleaner look
- Unify line thickness (2px default, 3px active)
- Enhance active state with expansion and glow effect
- Improve clickability with expanded hit areas
- Use #EB0029 for user messages and theme-inverse for agent

* style(ui): hide default scrollbar in chat view

- Add no-scrollbar utility class and CSS rules
- Ensure clean look with only the custom minimap rail visible

* style(ui): increase minimap line width for better visibility

- Default width: 2.5 (was 1.5)
- Active width: 4 (was 3)
- Hover width: 3.5 (was 2.5)
- Keeps the same premium thin height

* chore(pr): add minimap rail screenshots

* fix(ui): harden minimap and copy interactions

- debounce minimap line updates with raf scheduler
- clean up timeouts and rafs on unmount
- add retry logic for artifact flyout source lookup
- ensure minimap markers are keyboard accessible

* feat: unify slash command menu with input bar (anomalyco#202)

* feat: adjust session command list

* chore: bump version to 0.3.3

* feat: keep users oriented during workspace switches (anomalyco#204)

* chore: bump version to 0.3.4

* feat: window sidecar (anomalyco#205)

* feat: enable windows sidecar bundling

* fix: run sidecar prep from repo root

* fix: run sidecar prep via workspace filter

* refactor(ui): simplify session view with soft pill design and decomposed components

---------

Co-authored-by: ben <ben@prologe.io>
mayoalexander added a commit to FREELABEL/iris-opencode that referenced this pull request May 22, 2026
…ing + NCMA articles

Pulse fixes:
- 15s timeout wrapper on all channel fetches (Gmail, iMessage, Apple Mail, Calendar)
  prevents infinite hangs when endpoints are slow or disconnected
- Per-section try-catch on Communication Intelligence, Team Context, Workflow Status
  so one crash doesn't kill the entire pulse output
- Outer catch now prints full stack trace to stderr for MCP visibility
- Resolves ALL lead emails (primary + contact_info.emails + nurture_email) for scanning
- Gmail thread filter matches against all known emails, not just primary
- Apple Mail scans all emails in parallel with dedup
- Calendar event matching checks all emails in attendees
- `iris leads update --add-email` appends alternate emails to contact_info.emails

Mail attachments:
- `iris mail read` now shows attachment name, MIME type, size
- `iris mail search --attachments` lists attachments per result
- `--save-attachments` downloads to /tmp/iris-mail-attachments/
- Bridge AppleScript extracts attachment metadata with per-property error handling

NCMA newsletter:
- Added Rodney Mayo JA Career Fair article (page anomalyco#202)
- Added Tom Reid EO Fixed-Price article (page anomalyco#203)
- Both articles added to top of newsletter grid

Tests: 24 new tests (multi-email resolution, Gmail filtering, timeout, calendar, attachments)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Selecting a specific provider with OpenRouter

2 participants