From 941bf7ca42b6e827fca32ad43e0f4bcd707da887 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 8 Sep 2025 10:33:31 +0300 Subject: [PATCH] Update sample configs for OpenAI (gpt-5) to specify `max_completion_tokens`, not `max_response_tokens` Fixup for b43f61f5ff12dcda1996ee5dd6c9d19217b78300 --- etc/app/config.yml.dist | 6 +++--- src/agent/provider/openai/config.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/app/config.yml.dist b/etc/app/config.yml.dist index 693a5e7..57836a1 100644 --- a/etc/app/config.yml.dist +++ b/etc/app/config.yml.dist @@ -79,10 +79,10 @@ agents: # model_id: gpt-5 # prompt: "You are a brief, but helpful bot called {{ baibot_name }} powered by the {{ baibot_model_id }} model. The date/time of this conversation's start is: {{ baibot_conversation_start_time_utc }}." # temperature: 1.0 - # max_response_tokens: 16384 + # max_response_tokens: ~ # # Reasoning models need to use `max_completion_tokens` instead of `max_response_tokens`. - # max_completion_tokens: ~ - # max_context_tokens: 128000 + # max_completion_tokens: 128000 + # max_context_tokens: 400000 # speech_to_text: # model_id: whisper-1 # text_to_speech: diff --git a/src/agent/provider/openai/config.rs b/src/agent/provider/openai/config.rs index 594d5dc..d0735ee 100644 --- a/src/agent/provider/openai/config.rs +++ b/src/agent/provider/openai/config.rs @@ -72,9 +72,9 @@ impl Default for TextGenerationConfig { model_id: default_text_model_id(), prompt: Some(default_prompt().to_owned()), temperature: super::super::default_temperature(), - max_response_tokens: Some(16_384), - max_completion_tokens: None, - max_context_tokens: 128_000, + max_response_tokens: None, + max_completion_tokens: Some(128_000), + max_context_tokens: 400_000, } } }