@cartanova/qgrid-ai-sdk 2.7.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +12 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -90,10 +90,18 @@ const { output } = await generateText({
90
90
  console.log(output.title, output.authors);
91
91
  ```
92
92
 
93
- Schemas with a top-level `object` are forwarded to server-side structured output and enforced.
94
- If the top level is not an `object` (e.g. array), the AI SDK falls back to client-side parsing and a warning is logged.
95
-
96
- > **Note for Anthropic models:** OpenAI/codex structured output constrains decoding to the schema, so this class of failure is rare there. Claude Code's `--json-schema`, however, works as a `StructuredOutput` tool plus post-hoc validation, so the model may fail to honor a complex schema. For structured streaming only, qgrid sets `MAX_STRUCTURED_OUTPUT_RETRIES=1` (one attempt; values below 1 are clamped to 1) to bound stream latency. Non-streaming `generate` leaves that override unset and uses Claude Code's default retry budget. Validation failures after the applicable attempts return an explicit error instead of broken JSON.
93
+ Schemas with a top-level `object` are forwarded to the server. If the top level is not an
94
+ `object` (e.g. array), the AI SDK falls back to client-side parsing and a warning is logged.
95
+
96
+ > **Note for Anthropic models:** enforcement differs by provider. OpenAI/codex constrains
97
+ > decoding to the schema, so non-conforming output is rare. The Anthropic route has no
98
+ > enforcement mechanism: qgrid delivers your original schema as prompt guidance at the end of
99
+ > the system prompt, Claude Code generates plain text, and the server only strips code fences.
100
+ > The reply is schema-guided JSON text, **not server-validated JSON** — validation happens in
101
+ > this SDK via your zod schema (`Output.object` does this automatically), and a non-conforming
102
+ > reply surfaces as an explicit validation error on your side instead of hidden server retries.
103
+ > Raw HTTP consumers calling the qgrid API without this SDK must validate the response
104
+ > themselves.
97
105
 
98
106
  ### Streaming
99
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartanova/qgrid-ai-sdk",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "AI SDK LanguageModelV3 provider for qgrid",
5
5
  "repository": {
6
6
  "type": "git",