fix: update health checks to use new ModelFacade client API#470
fix: update health checks to use new ModelFacade client API#470andreatgretel merged 2 commits intomainfrom
Conversation
The ModelFacade constructor was refactored in #373 to accept a ModelClient instead of a SecretResolver. The health_checks.py script was not updated, causing a TypeError (exit code 2) on every run since March 9.
Greptile SummaryThis PR is a targeted one-line bugfix that brings
|
| Filename | Overview |
|---|---|
| scripts/health_checks.py | Updated _check_model to use create_model_client() factory + pass client= kwarg to ModelFacade, matching the new API introduced in #373. |
Sequence Diagram
sequenceDiagram
participant HC as health_checks.py
participant F as create_model_client()
participant SR as EnvironmentResolver
participant PR as ModelProviderRegistry
participant C as ModelClient
participant MF as ModelFacade
HC->>SR: EnvironmentResolver()
HC->>PR: _get_provider_registry(provider_name)
HC->>F: create_model_client(model_config, secret_resolver, provider_registry)
F->>SR: resolve(api_key_ref)
F->>PR: get_provider(model_config.provider)
F-->>HC: client (OpenAICompatibleClient / AnthropicClient)
HC->>MF: ModelFacade(model_config, provider_registry, client=client)
MF-->>HC: facade
HC->>MF: facade.generate() / facade.generate_text_embeddings()
Reviews (2): Last reviewed commit: "Merge branch 'main' into andreatgretel/f..." | Re-trigger Greptile
|
Health checks pipeline is passing again on this branch: https://github.com/NVIDIA-NeMo/DataDesigner/actions/runs/23749207791 All providers passed in 36s (previously failing with exit code 2 since March 9). |
nabinchha
left a comment
There was a problem hiding this comment.
Thanks @andreatgretel!
📋 Summary
The
ModelFacadeconstructor was refactored in #373 to require aModelClientinstead of aSecretResolver, butscripts/health_checks.pywas never updated. This causes aTypeError(exit code 2) on every Health Checks workflow run since March 9.🐛 Fixed
scripts/health_checks.pyto usecreate_model_client()factory and pass the resulting client toModelFacadevia theclientkeyword argument🤖 Generated with AI