@tinyweb_dev/agent-framework-llm 0.3.0 → 0.4.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/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/protocols/openai-chat.cjs +12 -0
- package/dist/protocols/openai-chat.cjs.map +1 -1
- package/dist/protocols/openai-chat.d.ts +2 -0
- package/dist/protocols/openai-chat.d.ts.map +1 -1
- package/dist/protocols/openai-chat.js +12 -0
- package/dist/protocols/openai-chat.js.map +1 -1
- package/dist/protocols/openai-compatible-chat.cjs +12 -0
- package/dist/protocols/openai-compatible-chat.cjs.map +1 -1
- package/dist/protocols/openai-compatible-chat.js +12 -0
- package/dist/protocols/openai-compatible-chat.js.map +1 -1
- package/dist/providers/openai-compatible.cjs +12 -0
- package/dist/providers/openai-compatible.cjs.map +1 -1
- package/dist/providers/openai-compatible.js +12 -0
- package/dist/providers/openai-compatible.js.map +1 -1
- package/dist/providers/openai.cjs +12 -0
- package/dist/providers/openai.cjs.map +1 -1
- package/dist/providers/openai.js +12 -0
- package/dist/providers/openai.js.map +1 -1
- package/package.json +2 -2
package/dist/providers/openai.js
CHANGED
|
@@ -2187,6 +2187,14 @@ var OpenAIChatToolCallDelta = Schema.Struct({
|
|
|
2187
2187
|
});
|
|
2188
2188
|
var OpenAIChatDelta = Schema.Struct({
|
|
2189
2189
|
content: optionalNull(Schema.String),
|
|
2190
|
+
/**
|
|
2191
|
+
* Thinking / chain-of-thought stream. DeepSeek + MiniMax native and
|
|
2192
|
+
* LiteLLM-normalized gateways use `reasoning_content`; OpenRouter (and some
|
|
2193
|
+
* Grok mirrors) use `reasoning`. Either must become `reasoning-delta` so
|
|
2194
|
+
* UIs are not stuck on a pre-text thinking spinner while the wire is live.
|
|
2195
|
+
*/
|
|
2196
|
+
reasoning_content: optionalNull(Schema.String),
|
|
2197
|
+
reasoning: optionalNull(Schema.String),
|
|
2190
2198
|
tool_calls: optionalNull(Schema.Array(OpenAIChatToolCallDelta))
|
|
2191
2199
|
});
|
|
2192
2200
|
var OpenAIChatChoice = Schema.Struct({
|
|
@@ -2363,6 +2371,10 @@ var step = (state, event) => Effect.gen(function* () {
|
|
|
2363
2371
|
const toolDeltas = delta?.tool_calls ?? [];
|
|
2364
2372
|
let tools = state.tools;
|
|
2365
2373
|
let textAcc = state.textAcc;
|
|
2374
|
+
const reasoningChunk = delta?.reasoning_content ?? delta?.reasoning;
|
|
2375
|
+
if (reasoningChunk) {
|
|
2376
|
+
events.push(LLMEvent.reasoningDelta({ id: "reasoning-0", text: reasoningChunk }));
|
|
2377
|
+
}
|
|
2366
2378
|
if (delta?.content) {
|
|
2367
2379
|
const normalised = normaliseTextDelta(textAcc, delta.content);
|
|
2368
2380
|
textAcc = normalised.textAcc;
|