mirror of
https://github.com/openai/codex.git
synced 2026-04-28 00:25:56 +00:00
Migrate model preset (#7542)
- Introduce `openai_models` in `/core` - Move `PRESETS` under it - Move `ModelPreset`, `ModelUpgrade`, `ReasoningEffortPreset`, `ReasoningEffortPreset`, and `ReasoningEffortPreset` to `protocol` - Introduce `Op::ListModels` and `EventMsg::AvailableModels` Next steps: - migrate `app-server` and `tui` to use the introduced Operation
This commit is contained in:
@@ -12,7 +12,6 @@ use std::time::Duration;
|
||||
|
||||
use crate::ConversationId;
|
||||
use crate::approvals::ElicitationRequestEvent;
|
||||
use crate::config_types::ReasoningEffort as ReasoningEffortConfig;
|
||||
use crate::config_types::ReasoningSummary as ReasoningSummaryConfig;
|
||||
use crate::custom_prompts::CustomPrompt;
|
||||
use crate::items::TurnItem;
|
||||
@@ -20,6 +19,8 @@ use crate::message_history::HistoryEntry;
|
||||
use crate::models::ContentItem;
|
||||
use crate::models::ResponseItem;
|
||||
use crate::num_format::format_with_separators;
|
||||
use crate::openai_models::AvailableModelsEvent;
|
||||
use crate::openai_models::ReasoningEffort as ReasoningEffortConfig;
|
||||
use crate::parse_command::ParsedCommand;
|
||||
use crate::plan_tool::UpdatePlanArgs;
|
||||
use crate::user_input::UserInput;
|
||||
@@ -208,6 +209,9 @@ pub enum Op {
|
||||
/// The raw command string after '!'
|
||||
command: String,
|
||||
},
|
||||
|
||||
/// Request the list of available models.
|
||||
ListModels,
|
||||
}
|
||||
|
||||
/// Determines the conditions under which the user is consulted to approve
|
||||
@@ -578,6 +582,7 @@ pub enum EventMsg {
|
||||
AgentMessageContentDelta(AgentMessageContentDeltaEvent),
|
||||
ReasoningContentDelta(ReasoningContentDeltaEvent),
|
||||
ReasoningRawContentDelta(ReasoningRawContentDeltaEvent),
|
||||
ListModelsResponse(AvailableModelsEvent),
|
||||
}
|
||||
|
||||
/// Codex errors that we expose to clients.
|
||||
|
||||
Reference in New Issue
Block a user