fix(agent): map the SDK's NoOutputGeneratedError to MODEL_OUTPUT_INVALID
Merged
VA
7d ago+119+119+012345678901234567890123456789-5-5-0123456789
Split out of #1214 per review feedback: the no-output-error remap is its own change with its own test.
When the model produces nothing to parse (an empty length finish, say), the AI SDK throws NoOutputGeneratedError from the result.output getter. The adapter's error translation did not recognize it, so it fell through to MODEL_PROVIDER_FAILED — an infrastructure verdict for what is really a response that failed the closed grammar. This maps it to MODEL_OUTPUT_INVALID instead: test category, run-retry eligible, and the invocation spends a repair round on it like any other malformed response.
Notes:
NoObjectGeneratedErrorandNoOutputGeneratedErrorare distinct classes in AI SDK 7.0.107 (both exported); the former is thrown parsing text, the latter by theresult.outputgetter. No rename involved.packages/e2e/tests/unit/no-output-error.test.tsscripts alengthfinish with empty text through the real adapter: it fails asMODEL_PROVIDER_FAILEDwithout the fix andMODEL_OUTPUT_INVALIDwith it.