-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Wire with_remote_overrides to construct model families
#7621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
with_remote_overrides to construct model families
|
@codex review this |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
| let config = session_configuration.original_config_do_not_use.clone(); | ||
| let mut per_turn_config = (*config).clone(); | ||
| per_turn_config.model = session_configuration.model.clone(); | ||
| per_turn_config.model_reasoning_effort = session_configuration.model_reasoning_effort; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super stoked we are keeping these. Is it possible to apply overrides to model but don't expose it on config an let everyone read random values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non blocking, just ranting.
codex-rs/core/src/codex.rs
Outdated
| assert_eq!(expected, got); | ||
| } | ||
|
|
||
| fn construct_model_family_offline(model: &str, config: &Config) -> ModelFamily { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't love how many helpers we have, I'd prefer if only methods on model_manager were public and we didn't expose find_family_for_model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's test only, I see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove this copy
codex-rs/core/src/codex.rs
Outdated
| session_source: SessionSource::Exec, | ||
| }; | ||
| let per_turn_config = Session::build_per_turn_config(&session_configuration); | ||
| let model_family = construct_model_family_offline(&per_turn_config.model, &per_turn_config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have models manager, can we toss a cfg(test)-only helper onto it?
pakrym-oai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main feedback - model family on chat.handle_codex_event. Can it be on the instance?
with_remote_overridesand make theconstruct_model_familiesan async functionsyncsynchelper for model families