From b430fe018946f2068950ba29926de0ef79789b04 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 20 Nov 2025 05:22:24 +0200 Subject: [PATCH] Update sample OpenAI config (for `gpt-5`) misleading users into using `max_response_tokens` & remove `openai-o1.yml` sample config No need to have both sample configs now. Fixes https://github.com/etkecc/baibot/issues/57 --- docs/providers.md | 5 +---- docs/sample-provider-configs/openai-o1.yml | 24 ---------------------- docs/sample-provider-configs/openai.yml | 7 +++++-- etc/app/config.yml.dist | 3 ++- 4 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 docs/sample-provider-configs/openai-o1.yml diff --git a/docs/providers.md b/docs/providers.md index 48f5f59..cd27132 100644 --- a/docs/providers.md +++ b/docs/providers.md @@ -125,10 +125,7 @@ For services which are not fully compatible with the OpenAI API, consider using - create a room-local agent: `!bai agent create-room-local openai my-openai-agent` - create a global agent: `!bai agent create-global openai my-openai-agent` -💡 When creating an agent, the bot will show you an up-to-date sample configuration for this provider which: - -- in the general case looks [like this](./sample-provider-configs/openai.yml) -- for the [o1](https://platform.openai.com/docs/models/o1) models needs to look [like this](./sample-provider-configs/openai-o1.yml) +💡 When creating an agent, the bot will show you an up-to-date sample configuration for this provider which looks [like this](./sample-provider-configs/openai.yml). ### OpenAI Compatible diff --git a/docs/sample-provider-configs/openai-o1.yml b/docs/sample-provider-configs/openai-o1.yml deleted file mode 100644 index 3473937..0000000 --- a/docs/sample-provider-configs/openai-o1.yml +++ /dev/null @@ -1,24 +0,0 @@ -base_url: https://api.openai.com/v1 -api_key: YOUR_API_KEY_HERE -text_generation: - model_id: o1-mini - # o1 models do not support a system prompt - prompt: null - temperature: 1.0 - # o1 models do not support max_response_tokens. - # They use `max_completion_tokens` as an alternative - max_response_tokens: null - max_completion_tokens: 16384 - max_context_tokens: 128000 -speech_to_text: - model_id: whisper-1 -text_to_speech: - model_id: tts-1-hd - voice: onyx - speed: 1.0 - response_format: opus -image_generation: - model_id: gpt-image-1 - style: null - size: null - quality: null diff --git a/docs/sample-provider-configs/openai.yml b/docs/sample-provider-configs/openai.yml index 356d917..b6e2c47 100644 --- a/docs/sample-provider-configs/openai.yml +++ b/docs/sample-provider-configs/openai.yml @@ -4,8 +4,11 @@ text_generation: 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_context_tokens: 128000 + # Reasoning models need to use `max_completion_tokens` instead of `max_response_tokens`. + # If you're dealing with a non-reasoning model, specify `max_response_tokens` and unset `max_completion_tokens`. + max_response_tokens: null + max_completion_tokens: 128000 + max_context_tokens: 400000 speech_to_text: model_id: whisper-1 text_to_speech: diff --git a/etc/app/config.yml.dist b/etc/app/config.yml.dist index 57836a1..897a229 100644 --- a/etc/app/config.yml.dist +++ b/etc/app/config.yml.dist @@ -79,8 +79,9 @@ 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: ~ # # Reasoning models need to use `max_completion_tokens` instead of `max_response_tokens`. + # # If you're dealing with a non-reasoning model, specify `max_response_tokens` and unset `max_completion_tokens`. + # max_response_tokens: null # max_completion_tokens: 128000 # max_context_tokens: 400000 # speech_to_text: