Populate resolved_model in the default OpenAI plugin from the response `model` field
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend-api-design
Research direction
Start in llm/default_plugins/openai_models.py by reading the default OpenAI Chat and AsyncChat response handling and the existing set_resolved_model() method. Use the response's model field only when it is present and differs from the requested model id, then verify that resolved_model records the returned model without adding another API call.
Written by the indexing model from the issue text.
Description
Following #1117: set_resolved_model() shipped in 0.27, and plugins like llm-gemini (modelVersion) and llm-llama-server (/models) now record the resolved model. The built-in OpenAI plugin (llm/default_plugins/openai_models.py) doesn't call it, even though the OpenAI-compatible response already carries a model field that resolves aliases to the dated snapshot — exactly the "you asked for a *-latest alias, the API tells you which version actually answered" case from #1117.
Proposal: in the default OpenAI Chat/AsyncChat plugin, call response.set_resolved_model(...) from the response's own model field when it is present and differs from the requested model id. Zero extra calls (the field is already in every response body), and it makes resolved_model populated by default for the most common provider — surfacing silent alias→version resolution, and any gateway/relay substitution, directly in llm logs.
Context for the rationale (reading the served model on every turn as a zero-cost provenance signal): Engine Provenance, doi.org/10.5281/zenodo.22722524 — but the concrete ask here is just wiring the existing set_resolved_model method into the default OpenAI plugin.
- Dominant language
- Python
- Stars
- 12.5k
- Forks
- 998
- Avg merge
- 8d 1h
- Merged PRs (30d)
- 12
Contributor guide
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.
More from simonw/llm
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100