Skip to content

Commit 44d2c62

Browse files
authored
Apply suggestions from code review
1 parent 91d0b2a commit 44d2c62

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/models/openai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ print(result.output)
729729

730730
To use OVHcloud AI Endpoints, you need to create a new API key. To do so, go to the [OVHcloud manager](https://ovh.com/manager), then in Public Cloud > AI Endpoints > API keys. Click on `Create a new API key` and copy your new key.
731731

732-
You can explore our [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to find which models are available.
732+
You can explore the [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to find which models are available.
733733

734734
You can set the `OVHCLOUD_API_KEY` environment variable and use [`OVHcloudProvider`][pydantic_ai.providers.ovhcloud.OVHcloudProvider] by name:
735735

pydantic_ai_slim/pydantic_ai/providers/ovhcloud.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def client(self) -> AsyncOpenAI:
4141
return self._client
4242

4343
def model_profile(self, model_name: str) -> ModelProfile | None:
44-
profile = None
44+
model_name = model_name.lower()
4545

4646
prefix_to_profile = {
4747
'llama': meta_model_profile,
@@ -52,8 +52,9 @@ def model_profile(self, model_name: str) -> ModelProfile | None:
5252
'qwen': qwen_model_profile,
5353
}
5454

55+
profile = None
5556
for prefix, profile_func in prefix_to_profile.items():
56-
if model_name.lower().startswith(prefix):
57+
if model_name.startswith(prefix):
5758
profile = profile_func(model_name)
5859

5960
# As the OVHcloud AI Endpoints API is OpenAI-compatible, let's assume we also need OpenAIJsonSchemaTransformer.

0 commit comments

Comments
 (0)