Skip to content

Conversation

@aibrahim-oai
Copy link
Collaborator

No description provided.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ 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".

Comment on lines 201 to 203
pub async fn list_models(&self) -> Vec<ModelPreset> {
self.models_manager.available_models.clone()
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge ListModels caches initial auth mode

ConversationManager::list_models() simply clones models_manager.available_models, which is built once in ConversationManager::new using the auth mode present at startup. There is no refresh when the auth state changes, so if the process starts unauthenticated and the user later logs in with an API key (or switches auth modes), ModelList responses continue to return the initial preset set (e.g., still exposing gpt-5.1-codex-max to API-key users) until restart. The model list should be computed from the current auth mode instead of a startup snapshot.

Useful? React with 👍 / 👎.


impl ModelsManager {
pub fn new(auth_mode: Option<AuthMode>) -> Self {
std::thread::sleep(Duration::from_secs(1));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be an async method load models and we should async sleep there

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or remove completely for now

Copy link
Collaborator

@pakrym-oai pakrym-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the sleep

@aibrahim-oai aibrahim-oai merged commit 00cc00e into main Dec 4, 2025
26 checks passed
@aibrahim-oai aibrahim-oai deleted the migrate-app-server branch December 4, 2025 01:17
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants