Skip to content

Commit bcb4607

Browse files
Fix vertexAI authorization header (#6400)
The header for authenticated request from vertex was using an invalid authorization value --------- Co-authored-by: rachelsaunders <[email protected]>
1 parent 1a47ed1 commit bcb4607

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

firebase-vertexai/CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unreleased
2-
2+
* [fixed] Fixed issue where authorization headers weren't correctly formatted and were ignored by the backend. (#6400)
33

44
# 16.0.0
55
* [feature] {{firebase_vertexai}} is now Generally Available (GA) and can be
@@ -52,4 +52,3 @@
5252
* [feature] Added support for `responseMimeType` in `GenerationConfig`.
5353
* [changed] Renamed `GoogleGenerativeAIException` to `FirebaseVertexAIException`.
5454
* [changed] Updated the KDocs for various classes and functions.
55-

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ internal constructor(
110110
try {
111111
val token = internalAuthProvider.getAccessToken(false).await()
112112

113-
headers["Authorization"] = token.token!!
113+
headers["Authorization"] = "Firebase ${token.token!!}"
114114
} catch (e: Exception) {
115115
Log.w(TAG, "Error getting Auth token ", e)
116116
}

0 commit comments

Comments
 (0)