You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implemented LLM_TRUNCATED_CALL_HINT, which is added to the LLM error response when a tool call is broken and the finish_reason is length or max_output_token, so that the LLM can try to use a smaller response and solve the issue itself.
How Has This Been Tested?
Ran live tests for OpenAI, ASICloud, and OpenRouter - all passed.
Checklist
PR contains autogenerated code
Self-review completed
Test scenarios above are passed with the version of the code from PR
@paul-v-snet@vsbogd tested e3a8a38: built the image, ran this branch's CI, and ran live sessions on OpenRouter with z-ai/glm-5.2 at the default config and at maxOutputToken: 120.
What I checked:
[LLM_USAGE] is at INFO on every call: 105 calls in the 120 run and 58 at the default.
17 replies at 120 and 2 at the default came back with finish_reason=length, and each one produced the empty-reply notice.
The V1 history problem does not exist here. The notice never reaches the prompt: 0 copies across all 105 and 58 REQUEST: lines, because history goes through the episodic buffer where the assistant message is kept as [TOOL CALL] and the send result as RETURN: None. On #337 the same scenario put 45 copies into a single prompt.
LLM_TRUNCATED_CALL_HINT did not fire in either run, so that path is still unverified live.
CI on this branch: MeTTa tests green, tests/pytest.sh 65 passed, Phase 1 2 failed, 127 passed. The two failures are mock/test_openclaw_delegate_mock.py::test_delegate_stays_async_under_a_slow_gateway_mock and mock/test_pin_invisible_within_iteration_mock.py::test_pin_invisible_within_iteration_mock, and the base branch run fails with exactly the same two, so they are not from this PR.
One thing outside this diff. At the default budget the container died while the agent was writing the escaped JSON of step 6:
The tool call is parsed before it reaches eval in src/loop.metta, so a malformed argument takes down the interpreter rather than one iteration. I saw it once and my attempt to reproduce it failed for an unrelated reason, so treat it as a single observation. It deserves its own ticket.
Verdict: PASS for the changes in this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A⚠️ vibe-coded⚠️ implementation of #337 for Omega V2.
What I did by myself in this PR:
What's different compared to #337:
LLM_TRUNCATED_CALL_HINT, which is added to the LLM error response when a tool call is broken and thefinish_reasonislengthormax_output_token, so that the LLM can try to use a smaller response and solve the issue itself.How Has This Been Tested?
Ran live tests for OpenAI, ASICloud, and OpenRouter - all passed.
Checklist