mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-08 05:18:49 +03:00
feat: add provider-native request switches (#5254)
This commit is contained in:
@@ -733,15 +733,19 @@ def test_update_provider_settings_updates_and_clears_oauth_proxy(
|
||||
},
|
||||
)
|
||||
|
||||
payload = update_provider_settings(
|
||||
{"provider": [provider_name], "proxy": [" http://127.0.0.1:7890 "]}
|
||||
)
|
||||
payload = update_provider_settings({
|
||||
"provider": [provider_name],
|
||||
"proxy": [" http://127.0.0.1:7890 "],
|
||||
"extraBody": [json.dumps({"tools": []})],
|
||||
})
|
||||
|
||||
providers = {row["name"]: row for row in payload["providers"]}
|
||||
assert providers[provider_name]["proxy"] == "http://127.0.0.1:7890"
|
||||
assert getattr(load_config(config_path).providers, config_attr).proxy == (
|
||||
"http://127.0.0.1:7890"
|
||||
)
|
||||
assert providers[provider_name]["extra_body"] == {"tools": []}
|
||||
assert getattr(load_config(config_path).providers, config_attr).extra_body == {"tools": []}
|
||||
|
||||
cleared = update_provider_settings({"provider": [provider_name], "proxy": [" "]})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user