anomalyco / anomalyco/models.dev

feat(provider): add Prem Router

Open Beginner friendly
#4,609 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
6.9k
Forks
1.7k
Avg merge
3h 21m
Merged PRs (30d)
873

Description

Request

Add Prem Router as a provider in models.dev so OpenCode can discover it as prem.

Prem Router exposes an OpenAI-compatible Chat Completions API:

  • Base URL: https://router.prem.io/v1
  • Auth environment variable: PREM_ROUTER_API_KEY
  • Models endpoint: authenticated GET /v1/models
  • Chat endpoint: POST /v1/chat/completions
  • SDK: @ai-sdk/openai-compatible

Model catalog

The key-specific catalog includes kimi-k3 and may include qwen-3.8-max. Model availability, context length, capabilities, and whether streaming is required are returned by GET /v1/models.

qwen-3.8-max requires reasoning to remain enabled.

References

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing provider definitions and the entry point that exposes models.dev providers, then compare a similar OpenAI-compatible provider. Use Prem's authenticated GET /v1/models behavior and @ai-sdk/openai-compatible details as the reference; done means OpenCode can discover Prem as prem with the documented key, model catalog, and chat endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.