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
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