feat: Enhance OpenAI provider configuration with extraBody support and apiType validation

This commit is contained in:
outlook84
2026-05-25 01:23:36 +08:00
committed by Xubin Ren
parent d472595417
commit c433d60681
9 changed files with 230 additions and 29 deletions
+12
View File
@@ -36,6 +36,18 @@ def test_provider_api_type_accepts_exact_values_only() -> None:
})
def test_provider_api_type_is_openai_only() -> None:
with pytest.raises(ValueError, match="only supported"):
Config.model_validate({
"providers": {
"custom": {
"apiBase": "https://example.test/v1",
"apiType": "responses",
}
}
})
def test_legacy_defaults_config_without_presets_still_resolves() -> None:
config = Config.model_validate({
"agents": {