Commit 27f8e4d
fix(python/google-ai): skip api_key check when use_vertexai is True
The api_key validation in GoogleAIChatCompletion, GoogleAITextCompletion,
and GoogleAITextEmbedding ran unconditionally, blocking Vertex AI users
who authenticate via Application Default Credentials (no API key).
Guard the check with `not google_ai_settings.use_vertexai` so that only
non-Vertex AI configurations require an API key. The error message
already reads 'when use_vertexai is False', matching the new condition.
Fixes #13483
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 429dd1c commit 27f8e4d
File tree
3 files changed
+3
-3
lines changed- python/semantic_kernel/connectors/ai/google/google_ai/services
3 files changed
+3
-3
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments