mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
test(integration): turn the model-info refresh off in every integration proxy config (#45104)
The shared integration proxy configs left the five-minute /v1/models refresh on, so every proxy booted from them sent a GET /v1/models to each openai-compatible deployment at boot and every 300 s after, including the per-test deployments other cells register against their own scripted wires. A scripted provider that asserts on the exact requests it receives then saw a GET it never scripted, mid-test. Set disable_model_info_refresh in proxy_config.yaml, coordination_redis_proxy_config.yaml, and oci_proxy_test_config.yaml, and drop the three per-test copies of that setting from the observability cells that each loaded the stock config and set it themselves. Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
This commit is contained in:
parent
44bc1656e7
commit
8283033c0e
6 changed files with 5 additions and 4 deletions
|
|
@ -3,6 +3,7 @@ general_settings:
|
|||
master_key: os.environ/LITELLM_MASTER_KEY
|
||||
database_url: os.environ/DATABASE_URL
|
||||
store_model_in_db: true
|
||||
disable_model_info_refresh: true
|
||||
disable_spend_logs: false
|
||||
proxy_batch_write_at: 1
|
||||
coordination_redis:
|
||||
|
|
|
|||
|
|
@ -132,9 +132,8 @@ def _upstream(request: Request) -> Reply:
|
|||
def _config(tmp_path: Path, **litellm_settings: object) -> Path:
|
||||
config: Final = _PROXY_CONFIG.validate_python(yaml.safe_load(STOCK_CONFIG.read_text()))
|
||||
settings: Final = {**_SETTINGS.validate_python(config["litellm_settings"]), **litellm_settings}
|
||||
general: Final = {**_SETTINGS.validate_python(config["general_settings"]), "disable_model_info_refresh": True}
|
||||
path: Final = tmp_path / "langtrace.yaml"
|
||||
path.write_text(yaml.safe_dump({**config, "litellm_settings": settings, "general_settings": general}))
|
||||
path.write_text(yaml.safe_dump({**config, "litellm_settings": settings}))
|
||||
return path
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ class RigFactory:
|
|||
def start(self) -> Iterator[Rig]:
|
||||
config: Final = yaml.safe_load(Path("tests/integration/proxy_config.yaml").read_text())
|
||||
config["litellm_settings"].update({"callbacks": ["otel"]})
|
||||
config["general_settings"].update({"disable_model_info_refresh": True, **self.settings})
|
||||
config["general_settings"].update(self.settings)
|
||||
config["callback_settings"] = {
|
||||
"otel": {"exporter": "http/json", "endpoint": self.sink.wire.url, "mapper_names": ["genai"]},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -394,7 +394,6 @@ class RigFactory:
|
|||
"callbacks": ["signoz"],
|
||||
"provider_url_destination_allowed_hosts": [self.tenant_sink.wire.url],
|
||||
},
|
||||
"general_settings": {**object_value(loaded["general_settings"]), "disable_model_info_refresh": True},
|
||||
}
|
||||
path: Final = self.directory / f"signoz-{uuid.uuid4().hex}.yaml"
|
||||
path.write_text(yaml.safe_dump(config))
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ model_list:
|
|||
|
||||
general_settings:
|
||||
master_key: os.environ/LITELLM_MASTER_KEY
|
||||
disable_model_info_refresh: true
|
||||
|
||||
litellm_settings:
|
||||
drop_params: True
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ general_settings:
|
|||
master_key: os.environ/LITELLM_MASTER_KEY
|
||||
database_url: os.environ/DATABASE_URL
|
||||
store_model_in_db: true
|
||||
disable_model_info_refresh: true
|
||||
disable_spend_logs: false
|
||||
proxy_batch_write_at: 1
|
||||
proxy_batch_polling_interval: 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue