@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.
@@ -2201,6 +2201,14 @@ var OpenAIChatToolCallDelta = effect$1.Schema.Struct({
2201
2201
  });
2202
2202
  var OpenAIChatDelta = effect$1.Schema.Struct({
2203
2203
  content: optionalNull(effect$1.Schema.String),
2204
+ /**
2205
+ * Thinking / chain-of-thought stream. DeepSeek + MiniMax native and
2206
+ * LiteLLM-normalized gateways use `reasoning_content`; OpenRouter (and some
2207
+ * Grok mirrors) use `reasoning`. Either must become `reasoning-delta` so
2208
+ * UIs are not stuck on a pre-text thinking spinner while the wire is live.
2209
+ */
2210
+ reasoning_content: optionalNull(effect$1.Schema.String),
2211
+ reasoning: optionalNull(effect$1.Schema.String),
2204
2212
  tool_calls: optionalNull(effect$1.Schema.Array(OpenAIChatToolCallDelta))
2205
2213
  });
2206
2214
  var OpenAIChatChoice = effect$1.Schema.Struct({
@@ -2377,6 +2385,10 @@ var step = (state, event) => effect$1.Effect.gen(function* () {
2377
2385
  const toolDeltas = delta?.tool_calls ?? [];
2378
2386
  let tools = state.tools;
2379
2387
  let textAcc = state.textAcc;
2388
+ const reasoningChunk = delta?.reasoning_content ?? delta?.reasoning;
2389
+ if (reasoningChunk) {
2390
+ events.push(LLMEvent.reasoningDelta({ id: "reasoning-0", text: reasoningChunk }));
2391
+ }
2380
2392
  if (delta?.content) {
2381
2393
  const normalised = normaliseTextDelta(textAcc, delta.content);
2382
2394
  textAcc = normalised.textAcc;