Repository navigation
Fix AI Chat in 3D models: keep save and publish tools out of the strict grammar - #85
Merged
Merged
Conversation
A model tab's editing, guidance and clone tools already fill the strict grammar the API compiles for each request. Adding three more strict tools made the API refuse every model-tab turn with "The compiled grammar is too large", so AI Chat failed in 3D models. The save and publishing tools are now loose tools, like the batch tool: the model still gets their schemas, and the browser checks their inputs. A test keeps the strict set unchanged. All warmed tab prompts were checked against the real API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since the last backend deploy, every AI Chat message from a 3D model tab fails with "The service is unavailable." The API refuses the turn with
400 invalid_request_error: The compiled grammar is too large… reduce the number of strict tools. A model tab's editing, guidance and clone tools already filled the strict grammar, and the three tools added in #84 pushed it over.document_save,commons_publishing_infoandcommons_publish_proposeare now loose tools, the same way the batch tool is. The model still gets their schemas, and the browser checks their inputs. A test keeps the model tab's strict tool set the same as before #84.Verified against the real API: the backend's warmed first-message prompts for Home, a model tab (editing, guidance, clone, save and publish) and a Layout tab are all accepted. Production logged the same 400 for the model-tab prompt before this fix.
🤖 Generated with Claude Code