Skip to content

Accept fenced AI Gateway JSON without fallback#74

Merged
hxddh merged 1 commit into
mainfrom
agent/accept-fenced-ai-gateway-json
Jul 21, 2026
Merged

Accept fenced AI Gateway JSON without fallback#74
hxddh merged 1 commit into
mainfrom
agent/accept-fenced-ai-gateway-json

Conversation

@hxddh

@hxddh hxddh commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • normalize pure Markdown JSON fences before strict parsing
  • avoid spending a fallback call when model JSON is otherwise valid
  • keep malformed/truncated content on the low-cost fallback path

Validation

  • python3 -m unittest discover -s tests (254 tests)
  • python3 -m py_compile scripts/cloud_agent_runner.py
  • git diff --check

Live evidence

Weekly run 29849754936 reached a complete finish_reason=stop JSON response wrapped in a json Markdown fence. Both GPT-OSS and Gemini may emit this presentation wrapper; accepting it is cheaper than retrying.

@hxddh
hxddh merged commit eed7983 into main Jul 21, 2026
2 checks passed
@hxddh
hxddh deleted the agent/accept-fenced-ai-gateway-json branch July 21, 2026 16:50
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