fix: limit llama-swap probing to loaded models#18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e4d5fade0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Query the underlying server through llama-swap's upstream proxy. | ||
| const context = | ||
| (await runtimeContext(`${url}/upstream/${item.id}`)) ?? 0 | ||
| body.data.filter((item) => loadedModels.has(item.id)).map(async (item) => { |
There was a problem hiding this comment.
Keep loaded llama-swap aliases visible
When llama-swap is configured to include aliases in /v1/models, /running reports only the real running process ID, so this exact-ID filter drops every alias even though the underlying model is already ready and /upstream/<alias> can route to it. In setups that expose aliases for variants/profiles, OpenCode will no longer show those usable loaded aliases after this change; map aliases back to their running real model or otherwise preserve aliases whose target is loaded.
Useful? React with 👍 / 👎.
Summary
/runningendpoint to identify the active model set before probing upstream metadataCloses #14