Skip to content

feat: discover Modal models - #39066

Merged
rekram1-node merged 5 commits into
anomalyco:devfrom
devennavani:modal-model-discovery
Jul 30, 2026
Merged

feat: discover Modal models#39066
rekram1-node merged 5 commits into
anomalyco:devfrom
devennavani:modal-model-discovery

Conversation

@devennavani

@devennavani devennavani commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #14389.

Related to #6231.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Modal model IDs are shared-endpoint hostnames scoped to the authenticated workspace, so they cannot be listed statically in models.dev.

This adds a built-in Modal provider plugin using OpenCode's existing provider.models hook. It fetches authenticated GET /v1/models, exposes the returned endpoint hostnames as callable model IDs, and consumes the returned model metadata, including reasoning variants and interleaved reasoning. Missing metadata falls back to the corresponding models.dev template. Discovery failures return no models rather than exposing non-callable template IDs.

The provider registration and Inkling fallback template landed in models.dev #3760.

How did you verify your code works?

  • bun test test/plugin/modal-models.test.ts
  • bun typecheck from packages/opencode
  • pre-push bun turbo typecheck (30 packages)

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential duplicate PRs found:

  1. PR feat(opencode): discover abacus models from /v1/models endpoint #34563: feat(opencode): discover abacus models from /v1/models endpoint

  2. PR feat(opencode): auto-discover models from OpenAI-compatible providers #32731: feat(opencode): auto-discover models from OpenAI-compatible providers

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@rekram1-node
rekram1-node merged commit 341c64c into anomalyco:dev Jul 30, 2026
9 of 10 checks passed
3kaiu pushed a commit to 3kaiu/opencode-x that referenced this pull request Jul 31, 2026
1056674754 added a commit to 1056674754/opencode that referenced this pull request Aug 5, 2026
Upstream v1.18.9 (4da7bb4) -> v1.18.10 (7902e04), 24 commits.

Functional changes:
- feat: discover Modal models (anomalyco#39066) - new packages/opencode/src/plugin/modal/
- fix: use OpenCode model catalog URL (anomalyco#39672) - models.dev -> models.opencode.ai
- fix(app): repair malformed persisted tabs (anomalyco#39645)
- fix(app): defer model variant selector (anomalyco#39445)
- fix(app): preserve agent picker for existing users (anomalyco#39300)
- feat(app): migrate to solid-sonner (anomalyco#39519)
- feat(app): attachment fades, duplicate guard, always-visible new session button
- feat(app): review tab top bar + tab state refinements
- fix(console): add public fetch compatibility flag
- docs(ecosystem): add opencode-tavily plugin (anomalyco#38709)
- chore: bump gitlab-ai-provider to 6.12.1 (anomalyco#39490)

Conflicts resolved: 29 package.json version bumps (rebranded 1.18.10-sscity)
and bun.lock (regenerated). No functional code conflicts.

Verified: Modal plugin tests pass (2/2), model catalog URL applied to all
3 files, fork-only changes (small_model_fallback, skill hot-reload, server
single-flight) intact. Pre-existing TUI type errors unrelated to this merge.
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 Modal provider support to OpenCode

2 participants