Repository navigation
fix: preserve provider models and clear stop errors - #76
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a0da6bbac
ℹ️ 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".
| if previous_model_provider in {"openai", "openrouter"}: | ||
| remembered_models[previous_model_provider] = model_field.text().strip() | ||
| self._model_provider = provider | ||
| if provider in {"openai", "openrouter"}: |
There was a problem hiding this comment.
Restore custom-provider models when switching back in settings
When settings are opened with a custom endpoint, switching to OpenAI or OpenRouter and then back to Custom replaces the original model with the other provider's model. Although _model_by_provider is initialized with the custom model, this handler neither remembers edits made for Custom nor restores its saved entry. For example, a custom endpoint using llama3.2 ends up with openai/gpt-4o-mini after an OpenRouter round trip; saving persists that incompatible model and subsequent requests can fail. Include Custom in the model preservation and restoration logic while retaining provider-specific defaults for OpenAI and OpenRouter.
Useful? React with 👍 / 👎.
Resolves the remaining actionable review findings from the repository notifications. Provider switches now retain separate OpenAI and OpenRouter model IDs across saves and restarts, and a successful retry clears stale recorder-stop errors. Adds regression coverage for both paths.