fix(opencode): pass configured headers to Copilot models (#32815)
This commit is contained in:
@@ -70,6 +70,7 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
|
|||||||
return CopilotModels.get(
|
return CopilotModels.get(
|
||||||
base(auth.enterpriseUrl),
|
base(auth.enterpriseUrl),
|
||||||
{
|
{
|
||||||
|
...(provider.options?.headers as Record<string, string> | undefined),
|
||||||
Authorization: `Bearer ${auth.refresh}`,
|
Authorization: `Bearer ${auth.refresh}`,
|
||||||
"User-Agent": `opencode/${InstallationVersion}`,
|
"User-Agent": `opencode/${InstallationVersion}`,
|
||||||
"X-GitHub-Api-Version": API_VERSION,
|
"X-GitHub-Api-Version": API_VERSION,
|
||||||
|
|||||||
Reference in New Issue
Block a user