anomalyco / anomalyco/models.dev
V2 API
@rekram1-node is already working on this.
Since Jul 5, 2026.
- Dominant language
- TypeScript
- Stars
- 6.9k
- Forks
- 1.7k
- Avg merge
- 3h 21m
- Merged PRs (30d)
- 873
Description
We are working on redesigning models.dev api
We are going to make a v2 version of our api, this is a master issue to track changes/proposals/requests that will be weighed when developing the new api standard, I will try to keep it up to date as best I can.
Note: v1 api will stay around, we are not breaking the api, v1 will get deprecated eventually but not for a while
Below llm generated goop that will get cleaned up as I clarify scope more
Goal
Track the proposed breaking changes for a models.dev API v2. Keep the API compact while making model capabilities, pricing, supported provider APIs, media, lifecycle, and regional availability more accurate.
Proposed changes
- Keep
modalitieswith nestedinputandoutputarrays, replacing broad non-text modalities with exact MIME types and wildcard MIME patterns.- Keep
textas the literaltext. - Include image, PDF, audio, and video MIME types.
- Providers should publish the narrowest accurate value.
- Keep
- Collapse
reasoningandreasoning_optionsinto one object:reasoning.supportedis a required boolean indicating whether this is a reasoning model.reasoning.optionsis a required array of the existing tagged reasoning configuration options.- Use an empty
optionsarray when reasoning is unsupported or has no request-time configuration.
- Group
tool_call,structured_output, andtemperatureundercapabilities.- Missing capability values continue to mean
false.
- Missing capability values continue to mean
- Keep
open_weightsas an explicit field; weights links and license metadata are not reliable substitutes. - Track cache pricing by duration, including 5-minute versus 1-hour writes.
- Related: #2814.
- Replace the one-off
context_over_200kfield with the generic conditional pricing mechanism. - Promote the selectable options currently represented by
experimental.modesinto a first-class concept for options such as fast, priority, or batch service. - Add region-aware availability and invocation information.
- Given an authenticated/configured region, identify which models are usable.
- Provide the model ID, endpoint/location, SKU, or deployment information needed to invoke them.
- Account for Bedrock, Vertex, and Azure having different regional semantics.
- Omit deprecated models from API responses by default, with an explicit query option to include/filter them.
- Support additional API query parameters, including provider, status, capabilities, input/output types, family, open weights, and eventually region.
- Remove SDK-specific
npmand APIshapeconcepts. - Add an
apinamespace for provider-model invocation metadata.api.formatsdescribes supported provider-neutral API formats such as OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, and Bedrock Converse.- Format-specific wire metadata lives beneath its format entry.
- For OpenAI-compatible reasoning round trips, use
api.formats.<format>.reasoning.fieldfor fields such asreasoning,reasoning_content, orreasoning_details. - Omit the format-specific reasoning object when no special reasoning field is required.
Remove
-
attachment -
context_over_200k -
npm -
shape - The
experimentalnesting around selectable service/billing modes
Still unsettled
Pricing and selectable modes
- Choose
cost,rates, or another pricing term. - Design one generic mechanism for context thresholds, cache durations, reasoning, media, batch/priority modes, and regional pricing.
- Define units and currency, including image/audio pricing where possible.
- Name the selectable fast/priority/batch concept (
modes,tiers, or another term). - Decide how mode-specific pricing relates to required request body/header changes.
- Decide whether a default mode is explicit.
- Handle off-peak pricing
Regions
- Define provider region registries and reusable groups.
- Define compact model availability expressions.
- Represent regional IDs, endpoints, SKUs, and deployment names without forcing unlike providers into a misleading abstraction.
Limits and usage
- Rework token limits/accounting to cover image and audio usage where providers expose it.
- Handle providers that meter media using different units.
Supported APIs
- Finalize the identifier for OpenAI Chat Completions.
- Decide whether identifiers should be provider-qualified.
Query API
- Choose parameter names and combination semantics.
- Define default status behavior precisely.
Needs triage before inclusion
- Revisit first-class model type/purpose metadata after higher-priority contract work.
- Related: #3028.
- Decide which remaining headers and body overrides belong under
api.formatsversus staying internal adapter metadata. - Add richer lifecycle metadata such as deprecation date, removal date, and replacement model.
- Add source and verification metadata.
Explicit non-goals / decisions
- Do not expose internal
base_modelinheritance in the public API. - Do not derive
open_weightssolely from weights links or license metadata. - Do not support the legacy OpenAI Completions API in v2; represent Chat Completions only.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.