Skip to content

Constrain Flash automatic tool calls and preserve visible answers - #47

Draft
TracSystems wants to merge 133 commits into
mainfrom
fix/flash-output-diagnostics-canary
Draft

TracSystems wants to merge 133 commits into
mainfrom
fix/flash-output-diagnostics-canary

Conversation

@TracSystems

@TracSystems TracSystems commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Flash could emit finish_reason=tool_calls with incomplete JSON arguments during an automatic tool call. Core correctly rejected the call, but the user task failed. The managed Flash runtime now constrains automatic tool calls so their XML/JSON structure is complete before the native response is returned.

OpenAI-compatible providers also preserve visible answers when thinking is enabled but no separate reasoning block is returned. An optional, bounded diagnostic records only response shape and validation outcomes to distinguish native output from envelope failures; it records no prompts or tool arguments.

The Flash-only canary passed public API calls with automatic tool choice across thinking on/off and streaming/non-streaming, a longer streamed tool call, and ordinary chat. All tool arguments were valid JSON. Comparable plain streamed generation measured 49.3 and 52.7 tokens/s after the change, within the expected operating range; measurements vary with load. Targeted provider tests and workspace metadata checks passed. No contract, catalog, or other model runtime changes are included. Full-fleet rollout is outside this PR's deployment scope.

@TracSystems TracSystems changed the title Add bounded opt-in provider output diagnostics Preserve OpenAI content-only replies and diagnose Flash output shape Sep 23, 2026
@TracSystems TracSystems changed the title Preserve OpenAI content-only replies and diagnose Flash output shape Constrain Flash automatic tool calls and preserve visible answers Sep 23, 2026

This branch has not been deployed

No deployments
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