mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 20:14:13 +00:00
fix: add token to the openai request
OpenAIMixin expects to use an API key and creates its own AsyncOpenAI client. So our code now authenticate with the Google service, retrieves a token and pass it to the OpenAI client. Falls back to an empty string if credentials can't be obtained (letting LiteLLM handle ADC directly). Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
3442f8865c
commit
73e99b6eab
2 changed files with 28 additions and 5 deletions
|
@ -76,6 +76,9 @@ def skip_if_doesnt_support_n(client_with_models, model_id):
|
|||
"remote::gemini",
|
||||
# https://docs.anthropic.com/en/api/openai-sdk#simple-fields
|
||||
"remote::anthropic",
|
||||
"remote::vertexai",
|
||||
# Error code: 400 - [{'error': {'code': 400, 'message': 'Unable to submit request because candidateCount must be 1 but
|
||||
# the entered value was 2. Update the candidateCount value and try again.', 'status': 'INVALID_ARGUMENT'}
|
||||
):
|
||||
pytest.skip(f"Model {model_id} hosted by {provider.provider_type} doesn't support n param.")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue