core/config+agent: OpenAI provider_tools for hosted Responses tools

Merge opaque tool dicts (web_search, file_search, …) into POST /responses; local ToolRegistry unchanged.
This commit is contained in:
2026-07-15 21:16:05 +08:00
parent 1f75cde3dd
commit 16992be743
8 changed files with 101 additions and 20 deletions
+13
View File
@@ -24,6 +24,19 @@ def test_openai_provider_defaults_base_url() -> None:
client = create_client(provider)
assert isinstance(client, ResponsesChatClient)
assert hasattr(client, "chat_completions")
assert client._provider_tools == []
def test_openai_provider_tools_passed_to_wrapper() -> None:
from plyngent.agent.responses_client import ResponsesChatClient
provider = OpenAIProvider(
access_key_or_token="sk-test",
provider_tools=[{"type": "web_search"}],
)
client = create_client(provider)
assert isinstance(client, ResponsesChatClient)
assert client._provider_tools == [{"type": "web_search"}]
def test_openai_compatible_requires_url() -> None: