tweak: add back setting user agent in requests (#18795)
parent
4aebaaf067
commit
691644eeeb
|
|
@ -250,12 +250,16 @@ export namespace LLM {
|
||||||
maxOutputTokens,
|
maxOutputTokens,
|
||||||
abortSignal: input.abort,
|
abortSignal: input.abort,
|
||||||
headers: {
|
headers: {
|
||||||
...(input.model.providerID.startsWith("opencode") && {
|
...(input.model.providerID.startsWith("opencode")
|
||||||
"x-opencode-project": Instance.project.id,
|
? {
|
||||||
"x-opencode-session": input.sessionID,
|
"x-opencode-project": Instance.project.id,
|
||||||
"x-opencode-request": input.user.id,
|
"x-opencode-session": input.sessionID,
|
||||||
"x-opencode-client": Flag.OPENCODE_CLIENT,
|
"x-opencode-request": input.user.id,
|
||||||
}),
|
"x-opencode-client": Flag.OPENCODE_CLIENT,
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
"User-Agent": `opencode/${Installation.VERSION}`,
|
||||||
|
}),
|
||||||
...input.model.headers,
|
...input.model.headers,
|
||||||
...headers,
|
...headers,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue