mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
fmt
This commit is contained in:
@@ -37,10 +37,7 @@ pub(crate) async fn stream_chat_completions(
|
||||
// Build messages array
|
||||
let mut messages = Vec::<serde_json::Value>::new();
|
||||
|
||||
let instr_cfg = crate::client_common::InstructionsConfig::for_model(
|
||||
model,
|
||||
include_plan_tool,
|
||||
);
|
||||
let instr_cfg = crate::client_common::InstructionsConfig::for_model(model, include_plan_tool);
|
||||
let full_instructions = prompt.get_full_instructions(&instr_cfg);
|
||||
messages.push(json!({"role": "system", "content": full_instructions}));
|
||||
|
||||
|
||||
@@ -671,8 +671,14 @@ mod tests {
|
||||
unknown_gpt_overrides,
|
||||
fixture.codex_home(),
|
||||
)?;
|
||||
assert!(unknown_gpt_cfg.include_plan_tool, "plan tool should default to ON for unknown GPT-like models");
|
||||
assert!(unknown_gpt_cfg.model_supports_reasoning_summaries, "reasoning summaries should default to ON for unknown GPT-like models");
|
||||
assert!(
|
||||
unknown_gpt_cfg.include_plan_tool,
|
||||
"plan tool should default to ON for unknown GPT-like models"
|
||||
);
|
||||
assert!(
|
||||
unknown_gpt_cfg.model_supports_reasoning_summaries,
|
||||
"reasoning summaries should default to ON for unknown GPT-like models"
|
||||
);
|
||||
|
||||
// Unknown non-GPT model -> defaults OFF for both.
|
||||
let unknown_non_gpt_overrides = ConfigOverrides {
|
||||
@@ -705,7 +711,10 @@ mod tests {
|
||||
known_overrides,
|
||||
fixture.codex_home(),
|
||||
)?;
|
||||
assert!(!known_cfg.include_plan_tool, "plan tool should default to OFF for known models");
|
||||
assert!(
|
||||
!known_cfg.include_plan_tool,
|
||||
"plan tool should default to OFF for known models"
|
||||
);
|
||||
assert!(
|
||||
!known_cfg.model_supports_reasoning_summaries,
|
||||
"reasoning summaries override should default to OFF for known models"
|
||||
|
||||
Reference in New Issue
Block a user