(
inference_client: InferenceRouteClient,
sandbox_client: SandboxClient,
)
| 144 | |
| 145 | @pytest.fixture |
| 146 | def managed_openai_route( |
| 147 | inference_client: InferenceRouteClient, |
| 148 | sandbox_client: SandboxClient, |
| 149 | ) -> Iterator[str]: |
| 150 | with _cluster_config_lock(): |
| 151 | previous = _current_cluster_inference(inference_client) |
| 152 | _upsert_managed_inference( |
| 153 | inference_client, |
| 154 | sandbox_client, |
| 155 | provider_name=_MANAGED_OPENAI_PROVIDER_NAME, |
| 156 | provider_type="openai", |
| 157 | credential_key="OPENAI_API_KEY", |
| 158 | base_url_key="OPENAI_BASE_URL", |
| 159 | model_id=_MANAGED_OPENAI_MODEL_ID, |
| 160 | base_url="mock://e2e-managed-openai", |
| 161 | ) |
| 162 | try: |
| 163 | yield _MANAGED_OPENAI_MODEL_ID |
| 164 | finally: |
| 165 | _restore_cluster_inference(inference_client, previous) |
| 166 | |
| 167 | |
| 168 | def test_model_discovery_call_routed_to_backend( |
nothing calls this directly
no test coverage detected