mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 15:02:32 +00:00
fix: apply extension provider registrations before model resolution
- Extensions register providers via pendingProviderRegistrations - These were only applied in bindCore() during AgentSession creation - But model resolution in main.ts happens before session creation - Fix: apply pending registrations immediately after loading extensions - Also fix gitlab-duo to pass Authorization header instead of apiKey
This commit is contained in:
parent
dd01d83e64
commit
7a5cfdaed0
3 changed files with 316 additions and 2 deletions
|
|
@ -257,13 +257,19 @@ function streamGitLabDuo(
|
|||
id: mapping.backendModel,
|
||||
api: mapping.api,
|
||||
baseUrl: mapping.baseUrl,
|
||||
headers: directAccess.headers,
|
||||
};
|
||||
|
||||
// Merge GitLab headers with Authorization bearer token
|
||||
const headers = {
|
||||
...directAccess.headers,
|
||||
Authorization: `Bearer ${directAccess.token}`,
|
||||
};
|
||||
|
||||
// Delegate to pi-ai's built-in streaming
|
||||
const innerStream = streamSimple(proxyModel, context, {
|
||||
...options,
|
||||
apiKey: directAccess.token,
|
||||
apiKey: "gitlab-duo", // Dummy value to pass validation
|
||||
headers,
|
||||
});
|
||||
|
||||
// Forward all events
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue