mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-29 21:33:54 +00:00
tweak: add back setting user agent in requests (#18795)
This commit is contained in:
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…
x
Reference in New Issue
Block a user