@firststep-studio/sdk 0.17.0 → 0.19.0

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.
package/README.md CHANGED
@@ -38,3 +38,31 @@ createServer(handler, {
38
38
  ## LLM Reference
39
39
 
40
40
  See `llms.txt` for full API specification.
41
+
42
+ ## Release notes
43
+
44
+ ### 0.19.0
45
+
46
+ - **Cohere model support.** `llm.generate` and `llm.generateStream` accept
47
+ `provider: 'cohere'` with a `command-*` model (Command A, Command A+,
48
+ Command R, Command R+, Command R7B), routed through Studio's `/api/llm/*`
49
+ proxy the same way Gemini requests are. Text generation, JSON output,
50
+ streaming, finish reasons and token usage are supported. Gemini-only
51
+ features (explicit prompt caches, thinking/safety settings, image parts,
52
+ function-calling payloads) are outside the Cohere adapter's contract.
53
+ - **Observable SSE stream errors.** `generateStream` only ever skipped a
54
+ chunk it could not parse as JSON at all (stray SSE comments/heartbeats). A
55
+ vendor error frame is valid JSON, so it used to be yielded as an ordinary
56
+ stream value, a plain object with an `error` field, indistinguishable from
57
+ a successful chunk to anything not inspecting its shape, so a failed turn
58
+ could look like a normal (if malformed) reply. A chunk shaped as an error
59
+ now throws `LLMError` instead of being yielded as data, with `status`
60
+ normalized to a numeric HTTP status: Gemini's numeric `code` or Cohere's
61
+ numeric `status` field is used when present, otherwise `502`. This throw
62
+ happens on the `.next()` call that reaches the error frame, not when
63
+ `generateStream()` creates the generator, so the `try/catch` must wrap the
64
+ entire iteration (the whole `for await` loop, or every subsequent manual
65
+ `.next()` call) and not just the call that obtains the stream.
66
+ - **Handler adoption required.** Handler must upgrade to this SDK version to
67
+ pick up both changes. Existing Gemini configurations keep their current
68
+ defaults.