Move metadata calculation out of client (#10589)

Model client shouldn't be responsible for this.
This commit is contained in:
pakrym-oai
2026-02-03 21:59:13 -08:00
committed by GitHub
parent 38a47700b5
commit 56ebfff1a8
6 changed files with 70 additions and 155 deletions

View File

@@ -337,9 +337,8 @@ async fn drain_to_completed(
turn_context: &TurnContext,
prompt: &Prompt,
) -> CodexResult<()> {
let mut client_session = turn_context
.client
.new_session(Some(turn_context.cwd.clone()));
let turn_metadata_header = turn_context.resolve_turn_metadata_header().await;
let mut client_session = turn_context.client.new_session(turn_metadata_header);
let mut stream = client_session.stream(prompt).await?;
loop {
let maybe_event = stream.next().await;