mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
Apply token-budgeted agent execution and context compaction to all AI agent runs instead of gating it behind execution_mode. Remove the legacy fixed-limit agent settings, keep compression_threshold defaulted to 80, and trim prompt history from the latest compression checkpoint. Why: Preserving a stable compressed context across turns keeps important conversation state available while allowing newer messages to append to a consistent prefix. That improves cache reuse and avoids repeatedly throwing away useful context just to stay under model limits. Compaction shape: before: turn 1 [full -> compact] | turn 2 [full -> compact] after: [compact checkpoint] -> turn 1 -> turn 2 -> ... --------- Co-authored-by: Rafael Silva <xfalcox@gmail.com> |
||
|---|---|---|
| .. | ||
| discourse_ai/ai_bot | ||
| ai_api_audit_log_serializer.rb | ||
| ai_artifact_key_value_serializer.rb | ||
| ai_artifact_serializer.rb | ||
| ai_chat_channel_serializer.rb | ||
| ai_custom_tool_list_serializer.rb | ||
| ai_custom_tool_serializer.rb | ||
| ai_embedding_definition_serializer.rb | ||
| ai_features_agent_serializer.rb | ||
| ai_inferred_concept_post_serializer.rb | ||
| ai_mcp_server_serializer.rb | ||
| ai_secret_serializer.rb | ||
| ai_sentiment_post_serializer.rb | ||
| ai_spam_serializer.rb | ||
| ai_tool_serializer.rb | ||
| ai_topic_summary_serializer.rb | ||
| ai_usage_serializer.rb | ||
| basic_llm_model_serializer.rb | ||
| inferred_concept_serializer.rb | ||
| llm_credit_allocation_serializer.rb | ||
| llm_feature_credit_cost_serializer.rb | ||
| llm_model_serializer.rb | ||
| llm_quota_serializer.rb | ||
| localized_ai_agent_serializer.rb | ||
| reviewable_ai_chat_message_serializer.rb | ||
| reviewable_ai_post_serializer.rb | ||
| reviewable_ai_tool_action_serializer.rb | ||