🤖 fix: recover workspace identity from conversational model responses #2215
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.
Summary
Adds a text-based fallback parser to workspace title generation so it succeeds even when models ignore the
Output.objectstructured output instruction and return conversational prose instead of JSON.Background
Some models (observed with
claude-haiku-4-5-20251001) respond to the workspace identity generation prompt with conversational markdown like:instead of the expected JSON object. The AI SDK's
Output.objectparser throwsNoObjectGeneratedError(with the raw text in.text), and the catch block previously only logged the error and moved to the next candidate — wasting valid data.Implementation
generateWorkspaceIdentity, detectNoObjectGeneratedErrorand extractname/titlefrom its.textproperty usingextractIdentityFromText()extractIdentityFromText()function tries multiple extraction strategies in order:**name:** \value``)name: "value")Validation
make typecheckpassesmake static-checkpasses (lint, format, docs links, shellcheck)Generated with
mux• Model:anthropic:claude-opus-4-6• Thinking:high• Cost:$0.00