Strongly type providerIDs #2156

Open
opened 2026-02-16 17:34:26 -05:00 by yindo · 2 comments
Owner

Originally created by @RhysSullivan on GitHub (Oct 18, 2025).

Originally assigned to: @rekram1-node on GitHub.

Image

In the SDK, provider IDs & models should be a string union with a allowed any string fallback so the user doesn't have to go to docs

Originally created by @RhysSullivan on GitHub (Oct 18, 2025). Originally assigned to: @rekram1-node on GitHub. <img width="539" height="337" alt="Image" src="https://github.com/user-attachments/assets/f401925f-edfe-4037-b33a-15cf233128a1" /> In the SDK, provider IDs & models should be a string union with a allowed any string fallback so the user doesn't have to go to docs
Author
Owner

@github-actions[bot] commented on GitHub (Oct 18, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2392: Both issues address TypeScript typing improvements for provider-related functionality in the SDK, though #2392 focuses on Plugin Provider types while this focuses on provider IDs

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 18, 2025): This issue might be a duplicate of existing issues. Please check: - #2392: Both issues address TypeScript typing improvements for provider-related functionality in the SDK, though #2392 focuses on Plugin Provider types while this focuses on provider IDs Feel free to ignore if none of these address your specific case.
Author
Owner

@OpeOginni commented on GitHub (Oct 20, 2025):

I just want to confirm, the feature requested here is that, there should be some type of assisted typing for the possible combinations of providerIDs and modelIDs, supported by OpenCode, hence the ones in https://models.dev/.

But still allowing devs to write something custom?

@OpeOginni commented on GitHub (Oct 20, 2025): I just want to confirm, the feature requested here is that, there should be some type of assisted typing for the possible combinations of providerIDs and modelIDs, supported by OpenCode, hence the ones in https://models.dev/. But still allowing devs to write something custom?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2156