Skip to content

feat: add use_models_dev for model inheritance from models.dev - #12779

Closed
mcowger wants to merge 3 commits into
anomalyco:devfrom
mcowger:custom-models-dev
Closed

mcowger wants to merge 3 commits into
anomalyco:devfrom
mcowger:custom-models-dev

Conversation

@mcowger

@mcowger mcowger commented Feb 9, 2026

Copy link
Copy Markdown

What does this PR do?

Add ability for custom models to inherit metadata from models.dev using the use_models_dev field with 'provider/model' format.

Changes:

  • Extract mergeModel() helper with variadic merge function for cleaner priority-based field resolution (explicit > inherited > existing > defaults)
  • Add comprehensive tests for inheritance and invalid reference handling

Models can now inherit base properties from models.dev while overriding specific fields:
{ use_models_dev: 'anthropic/claude-sonnet-4-20250514', limit: {...} }

This address and fixes #9311

How did you verify your code works?

  1. Added appropriate CI tests
  2. Performed local manual tests with overrides and use_models_dev and confirmed that inherited options (like variants, context size, etc) were respected despite not being explicitly defined.

@github-actions

github-actions Bot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

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

No duplicate PRs found

mcowger and others added 3 commits February 8, 2026 20:57
Add ability for custom models to inherit metadata from models.dev using
the use_models_dev field with 'provider/model' format.

Changes:
- Extract mergeModel() helper with variadic merge function for cleaner
  priority-based field resolution (explicit > inherited > existing > defaults)
- Add comprehensive tests for inheritance and invalid reference handling

Models can now inherit base properties from models.dev while overriding
specific fields:
  { use_models_dev: 'anthropic/claude-sonnet-4-20250514', limit: {...} }

Closes #9311
@mcowger

mcowger commented Feb 9, 2026

Copy link
Copy Markdown
Author

Test failures are flakes in unrelated code.

@mcowger mcowger closed this by deleting the head repository Feb 11, 2026
@manascb1344

Copy link
Copy Markdown

Why did you close the PR?

@mcowger

mcowger commented Feb 15, 2026

Copy link
Copy Markdown
Author

Why did you close the PR?

Because I don't want to maintain a PR up to date for an extended period with no response.

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]: Use models.dev data for custom providers

2 participants