fix(providers): tighten tool calls and compatibility fallbacks

Require structured tool calls and explicit unsupported-feature errors.
Preserve supported SDK compaction requests and add compatibility coverage.

Co-authored-by: Xubin Ren <52506698+Re-bin@users.noreply.github.com>
This commit is contained in:
chengyongruandXubin Ren authored and Xubin Ren committed 2026-10-31 11:55:13 +08:00
1 parent 3e40684112
commit 8b37976d36
16 files changed
+406 -168

No files matched your search

+1 -1
View File
@@ -689,7 +689,7 @@ async def test_direct_openai_retries_without_unsupported_server_compaction() ->
assert result.content == "compaction fallback"
assert result.provider_state is not None
assert mock_responses.await_count == 2
assert "context_management" in mock_responses.call_args_list[0].kwargs
assert "context_management" in mock_responses.call_args_list[0].kwargs["extra_body"]
assert "context_management" not in mock_responses.call_args_list[1].kwargs
assert provider.supports_native_compaction("gpt-5.6") is False
mock_chat.assert_not_awaited()