fix: Tighten required shape of frameOrdinal/backendNodeID [stacked]#1963
Closed
fix: Tighten required shape of frameOrdinal/backendNodeID [stacked]#1963
Conversation
|
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.
Why
We were asking the LLM to return a single
elementId: stringfield, where the model was expected to return an encoded value like"0-76"or"16-21"that packed both the frame ordinal and backend node id into one string. That made it possible for the LLM to return structurally invalid data for that field, like"9786"or empty strings.Several tickets were seeing this error:
No object generated: response did not match schemaSTG-1486, STG-1555, STG-1634, STG-1690
What Changed
Stacked on top of #1949.
This PR fixes this by tightening up the required shape of the data returned by the LLM:
target: { frameOrdinal: number, backendNodeId: number }This PR does not change anything user facing. We intentionally stop at the inference boundary. I also kept using the old encoded snapshot maps and legacy
elementIdshape upstream for now to keep the PR focused.elementIdstrings with typedtargetrefs in the internal act/observe schemas.act,observe, anddragAndDropelement refs.Summary by cubic
Require typed element refs
target: { frameOrdinal, backendNodeId }foract/observe, canonicalizetwoStepas a top‑level boolean, and convert back to legacy encoded IDs at the inference boundary. Also enable structured outputs across AI SDK providers, harden local CDP connect with transient retries, and route legacy model names through the AI SDK. This closes schema holes that caused “No object generated: response did not match schema” in STG-1486, STG-1555, STG-1634, and STG-1690, with no public API changes.Bug Fixes
clickwithout abutton.twoStepas a top-level field; rejecttwoStepnested insideaction.NoObjectGeneratedErrorfromact,extract, andfillForm; keepV3AgentHandler.execute()returning a failed result instead of throwing.Refactors
modelActionsschemas (elementRef,ModelAction,ModelActResponse) and use them internally; convert typed refs to legacy IDs/args at the inference boundary.openai,azure,google/vertex,anthropic,groq,cerebras, andmistralvia provider options; updateAISdkClientWrappedto useOutput.objectwithgenerateText.OpenAIClientand consolidate provider handling.Written for commit 1fad611. Summary will update on new commits. Review in cubic