mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
feat(gemini-cli): add proper User-Agent and X-Goog-Api-Client headers
Match native GeminiCLI client fingerprint to avoid upstream rejection. Also fix base executor to call transformRequest before buildHeaders so subclasses can store model context for header generation. Made-with: Cursor
This commit is contained in:
committed by
decolua
parent
10b22d1318
commit
06a5307160
@@ -84,8 +84,8 @@ export class BaseExecutor {
|
||||
|
||||
for (let urlIndex = 0; urlIndex < fallbackCount; urlIndex++) {
|
||||
const url = this.buildUrl(model, stream, urlIndex, credentials);
|
||||
const headers = this.buildHeaders(credentials, stream);
|
||||
const transformedBody = this.transformRequest(model, body, stream, credentials);
|
||||
const headers = this.buildHeaders(credentials, stream);
|
||||
|
||||
if (!retryAttemptsByUrl[urlIndex]) retryAttemptsByUrl[urlIndex] = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user