mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 09:52:36 +00:00
fix: correctly unwrap provider data api_key from secret string (#4380)
# What does this PR do? Fix provider header API key handling by correctly unwrapping `SecretStr` values for provider data API keys. Previously the validator cast header keys to `SecretStr` but the value wasn’t unwrapped before use, causing authentication failures with providers like Azure. Closes https://github.com/llamastack/llama-stack/issues/4370
This commit is contained in:
parent
2b85600a7e
commit
4043dedeea
1 changed files with 2 additions and 2 deletions
|
|
@ -7,14 +7,14 @@
|
|||
import os
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, Field, HttpUrl, SecretStr
|
||||
from pydantic import BaseModel, Field, HttpUrl
|
||||
|
||||
from llama_stack.providers.utils.inference.model_registry import RemoteInferenceProviderConfig
|
||||
from llama_stack_api import json_schema_type
|
||||
|
||||
|
||||
class AzureProviderDataValidator(BaseModel):
|
||||
azure_api_key: SecretStr = Field(
|
||||
azure_api_key: str = Field(
|
||||
description="Azure API key for Azure",
|
||||
)
|
||||
azure_api_base: HttpUrl = Field(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue