@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.
@@ -2184,6 +2184,14 @@ var OpenAIChatToolCallDelta = effect$1.Schema.Struct({
2184
2184
  });
2185
2185
  var OpenAIChatDelta = effect$1.Schema.Struct({
2186
2186
  content: optionalNull(effect$1.Schema.String),
2187
+ /**
2188
+ * Thinking / chain-of-thought stream. DeepSeek + MiniMax native and
2189
+ * LiteLLM-normalized gateways use `reasoning_content`; OpenRouter (and some
2190
+ * Grok mirrors) use `reasoning`. Either must become `reasoning-delta` so
2191
+ * UIs are not stuck on a pre-text thinking spinner while the wire is live.
2192
+ */
2193
+ reasoning_content: optionalNull(effect$1.Schema.String),
2194
+ reasoning: optionalNull(effect$1.Schema.String),
2187
2195
  tool_calls: optionalNull(effect$1.Schema.Array(OpenAIChatToolCallDelta))
2188
2196
  });
2189
2197
  var OpenAIChatChoice = effect$1.Schema.Struct({
@@ -2360,6 +2368,10 @@ var step = (state, event) => effect$1.Effect.gen(function* () {
2360
2368
  const toolDeltas = delta?.tool_calls ?? [];
2361
2369
  let tools = state.tools;
2362
2370
  let textAcc = state.textAcc;
2371
+ const reasoningChunk = delta?.reasoning_content ?? delta?.reasoning;
2372
+ if (reasoningChunk) {
2373
+ events.push(LLMEvent.reasoningDelta({ id: "reasoning-0", text: reasoningChunk }));
2374
+ }
2363
2375
  if (delta?.content) {
2364
2376
  const normalised = normaliseTextDelta(textAcc, delta.content);
2365
2377
  textAcc = normalised.textAcc;