discourse/plugins/discourse-ai/lib/ai_bot
Rafael dos Santos Silva 74693d5f75
FIX: Agentic agents crash when max_turn_tokens is empty (#40952)
Previously, an agent in agentic execution mode with an empty
`max_turn_tokens` crashed with "comparison of Integer with nil failed"
because the token-budget loop compared the running token count against a
nil budget.

This change defaults the turn budget to half of the model's context
window when `max_turn_tokens` is empty, so agentic agents keep working
without an explicit budget.
2026-06-16 16:59:58 -03:00
..
chat_streamer.rb
entry_point.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
playground.rb FEATURE: Provider-native built-in tools for agents (web search) (#40809) 2026-06-16 14:37:51 -03:00
post_streamer.rb
response_http_streamer.rb DEV: Enable Style/RedundantBegin rubocop rule (#40096) 2026-05-19 18:44:54 +02:00
site_settings_extension.rb
stream_reply_custom_tools_session.rb FIX: Agentic agents crash when max_turn_tokens is empty (#40952) 2026-06-16 16:59:58 -03:00