Skip to content

fix(chat): log diagnostics when tool loop returns an empty answer - #7

Open
Zeptiny wants to merge 1 commit into
feature/lore-encyclopediafrom
fix/tool-loop-empty-answer-logging
Open

fix(chat): log diagnostics when tool loop returns an empty answer#7
Zeptiny wants to merge 1 commit into
feature/lore-encyclopediafrom
fix/tool-loop-empty-answer-logging

Conversation

@Zeptiny

@Zeptiny Zeptiny commented Aug 21, 2026

Copy link
Copy Markdown
Owner

The 'Não foi possível gerar uma resposta.' fallback fired silently with no log output, making empty LLM responses (e.g. reasoning models burning the whole max_tokens budget, finish_reason=length, content_filter) impossible to diagnose. Now the fallback logs a WARNING with model, rounds used, finish_reason history and token usage; each loop round logs finish_reason and usage at DEBUG; malformed tool-call arguments and exhausted max_rounds are logged too. Whitespace-only content now also triggers the fallback instead of sending a blank embed.

The 'Não foi possível gerar uma resposta.' fallback fired silently with
no log output, making empty LLM responses (e.g. reasoning models burning
the whole max_tokens budget, finish_reason=length, content_filter)
impossible to diagnose. Now the fallback logs a WARNING with model,
rounds used, finish_reason history and token usage; each loop round
logs finish_reason and usage at DEBUG; malformed tool-call arguments
and exhausted max_rounds are logged too. Whitespace-only content now
also triggers the fallback instead of sending a blank embed.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5530cce5-2ed8-4f50-93fe-ae43a5bf5832

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant