feat(provider): add pipeline reasoning controls (#2373)

* feat(provider): add pipeline reasoning controls

* fix(provider): preserve local agent model compatibility

* refactor(web): use shadcn reasoning slider

* fix(runtime): stabilize reasoning chat delivery

* fix(provider): route reasoning controls by model family

* fix(provider): handle hosted Kimi reasoning protocols

* fix(provider): map qwen reasoning levels to budgets

* fix(provider): preserve think tags in streamed reasoning

* fix(provider): preserve reasoning tool metadata

* style(provider): satisfy ruff checks after merge

* fix(persistence): preserve reasoning migration compatibility
This commit is contained in:
Dongchuan Fu
2026-08-09 17:38:01 +08:00
committed by GitHub
parent 22c389edc1
commit e37987215e
39 changed files with 3499 additions and 87 deletions
@@ -178,6 +178,27 @@ def test_stream_accumulator_merges_fragmented_tool_call_arguments():
assert final_msg.tool_calls[0].function.arguments == '{"command":"pwd"}'
def test_stream_accumulator_preserves_tool_call_provider_specific_fields():
accumulator = _StreamAccumulator()
emitted = accumulator.add(
provider_message.MessageChunk(
role='assistant',
tool_calls=[
provider_message.ToolCall(
id='call-gemini',
type='function',
function=provider_message.FunctionCall(name='lookup', arguments='{}'),
provider_specific_fields={'thought_signature': 'sig'},
)
],
is_final=True,
)
)
assert emitted is not None
assert emitted.tool_calls[0].provider_specific_fields == {'thought_signature': 'sig'}
def test_stream_accumulator_strips_leading_think_from_tool_round_content():
accumulator = _StreamAccumulator(
msg_sequence=3,