Skip to content

Fix JSON parsing failures from LLM responses with control characters#107

Closed
KavyaSree2610 wants to merge 4 commits intomainfrom
kkaitepalli/anthropic-op-fix
Closed

Fix JSON parsing failures from LLM responses with control characters#107
KavyaSree2610 wants to merge 4 commits intomainfrom
kkaitepalli/anthropic-op-fix

Conversation

@KavyaSree2610
Copy link
Collaborator

@KavyaSree2610 KavyaSree2610 commented Feb 18, 2026

  • This PR fixes a bug where LLM responses containing literal control characters (tabs, carriage returns) or invalid escape sequences (e.g., \&) in JSON strings cause JSONDecodeError exhausting retries and failing the task.
  • Adds a workflow_dispatch trigger in dockerBuildPush flow to allow manual runs from Github actions UI

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.30%. Comparing base (a68a96c) to head (13c336d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
+ Coverage   91.72%   92.30%   +0.58%     
==========================================
  Files          21       21              
  Lines         834      871      +37     
==========================================
+ Hits          765      804      +39     
+ Misses         69       67       -2     
Flag Coverage Δ
integration 58.32% <4.76%> (-2.23%) ⬇️
ollama_local 65.09% <57.14%> (+0.46%) ⬆️
slow-browser 51.77% <4.76%> (-2.06%) ⬇️
slow-other 73.93% <66.66%> (+4.27%) ⬆️
unit 66.70% <100.00%> (+1.47%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/microbots/llm/anthropic_api.py 100.00% <100.00%> (ø)
src/microbots/llm/llm.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KavyaSree2610 KavyaSree2610 marked this pull request as ready for review February 18, 2026 13:53
@KavyaSree2610 KavyaSree2610 deleted the kkaitepalli/anthropic-op-fix branch March 5, 2026 10:34
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.

2 participants