@theokit/sdk 2.11.2 → 2.11.3
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/CHANGELOG.md +6 -0
- package/dist/a2a/index.cjs +10 -0
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +10 -0
- package/dist/a2a/index.js.map +1 -1
- package/dist/cron.cjs +10 -0
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.js +10 -0
- package/dist/cron.js.map +1 -1
- package/dist/eval.cjs +10 -0
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +10 -0
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/llm/openai.d.ts +12 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.11.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bb3a7d8: Fail-loud on in-stream provider errors. OpenRouter (and some OpenAI-compatible proxies) report auth / quota / rate-limit failures as an HTTP 200 SSE body carrying `data: {"error":{"message":"...","code":401}}` rather than a non-2xx status. The stream accumulator only reads `choices`, so such an error-only chunk produced zero events and the turn finished empty — the failure was silently swallowed (a dead API key looked like an empty model response). The OpenAI client now detects an in-stream `error` chunk and throws the same typed error a non-2xx HTTP status would (`AuthenticationError` / `RateLimitError` / `ConfigurationError` / …), so callers surface it instead of a blank turn. Fixes usetheodev/theocode#31.
|
|
8
|
+
|
|
3
9
|
## 2.11.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/a2a/index.cjs
CHANGED
|
@@ -10279,6 +10279,16 @@ var init_openai2 = __esm({
|
|
|
10279
10279
|
} catch {
|
|
10280
10280
|
continue;
|
|
10281
10281
|
}
|
|
10282
|
+
if (chunk.error !== void 0 && chunk.error !== null) {
|
|
10283
|
+
const status = typeof chunk.error.code === "number" ? chunk.error.code : 502;
|
|
10284
|
+
throw mapOpenAICompatibleError({
|
|
10285
|
+
providerId,
|
|
10286
|
+
status,
|
|
10287
|
+
body: chunk,
|
|
10288
|
+
headers: response.headers,
|
|
10289
|
+
endpoint: "/v1/chat/completions"
|
|
10290
|
+
});
|
|
10291
|
+
}
|
|
10282
10292
|
const events = accumulator.consume(chunk);
|
|
10283
10293
|
for (const event of events) yield event;
|
|
10284
10294
|
}
|