mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
fix: correct X-Glama-Metadata placement
This commit is contained in:
@@ -73,13 +73,27 @@ export class GlamaHandler implements ApiHandler, SingleCompletionHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { data: completion, response } = await this.client.chat.completions
|
const { data: completion, response } = await this.client.chat.completions
|
||||||
.create({
|
.create(
|
||||||
model: this.getModel().id,
|
{
|
||||||
max_tokens: maxTokens,
|
model: this.getModel().id,
|
||||||
temperature: 0,
|
max_tokens: maxTokens,
|
||||||
messages: openAiMessages,
|
temperature: 0,
|
||||||
stream: true,
|
messages: openAiMessages,
|
||||||
})
|
stream: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
"X-Glama-Metadata": JSON.stringify({
|
||||||
|
labels: [
|
||||||
|
{
|
||||||
|
key: "app",
|
||||||
|
value: "vscode.rooveterinaryinc.roo-cline",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
)
|
||||||
.withResponse()
|
.withResponse()
|
||||||
|
|
||||||
const completionRequestId = response.headers.get("x-completion-request-id")
|
const completionRequestId = response.headers.get("x-completion-request-id")
|
||||||
@@ -101,14 +115,6 @@ export class GlamaHandler implements ApiHandler, SingleCompletionHandler {
|
|||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${this.options.glamaApiKey}`,
|
Authorization: `Bearer ${this.options.glamaApiKey}`,
|
||||||
"X-Glama-Metadata": JSON.stringify({
|
|
||||||
labels: [
|
|
||||||
{
|
|
||||||
key: "app",
|
|
||||||
value: "vscode.rooveterinaryinc.roo-cline",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user