Compare commits

...

17 Commits

Author SHA1 Message Date
Bryan Morgan 8e49bdc407 Merge branch 'main' into fix/retry-logic-for-all-users 2026-02-26 22:41:37 -05:00
Bryan Morgan 9b9b78db13 fix(core): Resolve build errors by correcting https agent usage 2026-02-26 22:39:16 -05:00
Bryan Morgan c585354fac refactor(core): apply scoped timeouts to CodeAssistServer via httpAgent 2026-02-26 19:09:12 -05:00
Bryan Morgan 6622ea6c47 fix(ci): fix all yamllint quoted-strings violations in GitHub Actions and workflows 2026-02-26 14:37:41 -05:00
Bryan Morgan c16b830035 chore: disable strict quoted-strings yamllint rule to unblock CI 2026-02-26 14:21:25 -05:00
Bryan Morgan d28d2fb946 fix(ci): double quote branch-or-commit in eval workflow to fix actionlint error 2026-02-26 13:47:01 -05:00
Bryan Morgan 59c7bc1e2c Merge branch 'main' into fix/headers-timeout-pro-models 2026-02-26 13:28:56 -05:00
Bryan Morgan 4d3a165744 chore: update license year to 2026 in errors_timeout.test.ts 2026-02-26 13:10:47 -05:00
Bryan Morgan 9b5ec7e5b3 Merge branch 'main' into fix/headers-timeout-pro-models 2026-02-26 12:08:32 -05:00
Bryan Morgan 8abf08c974 refactor(core): use global undici timeouts instead of hard request timeouts 2026-02-26 11:49:15 -05:00
Bryan Morgan 2076235bd2 Merge branch 'main' into fix/headers-timeout-pro-models 2026-02-26 11:48:00 -05:00
Bryan Morgan 7e6e078551 test: resolve directory naming collision in integration tests 2026-02-26 09:55:39 -05:00
Bryan Morgan ebd8d9f139 Merge branch 'main' into fix/headers-timeout-pro-models 2026-02-26 09:32:20 -05:00
Bryan Morgan 498a4eac65 merge: resolve conflict in agent.integration.test.ts 2026-02-26 09:20:40 -05:00
Bryan Morgan 968b5395fe feat(core): increase fetch timeout and improve error stringification for high-latency models 2026-02-26 08:59:46 -05:00
Bryan Morgan 7d71eb57ec test(sdk): fix flaky agent integration test missing fakeResponses 2026-02-26 07:55:16 -05:00
Bryan Morgan c496a4513f feat(core): add HTTP 499 to retryable errors and map to RetryableQuotaError 2026-02-26 07:43:35 -05:00
+8
View File
@@ -5,6 +5,7 @@
*/
import type { AuthClient } from 'google-auth-library';
import { Agent } from 'node:https';
import type {
CodeAssistGlobalUserSettingResponse,
LoadCodeAssistRequest,
@@ -54,6 +55,7 @@ import {
} from './telemetry.js';
import { getClientMetadata } from './experiments/client_metadata.js';
import type { LlmRole } from '../telemetry/types.js';
/** HTTP options to be used in each of the requests. */
export interface HttpOptions {
/** Additional HTTP headers to be sent with the request. */
@@ -71,6 +73,9 @@ export class CodeAssistServer implements ContentGenerator {
readonly sessionId?: string,
readonly userTier?: UserTierId,
readonly userTierName?: string,
private readonly httpsAgent = new Agent({
timeout: 300000,
}),
) {}
async generateContentStream(
@@ -305,6 +310,7 @@ export class CodeAssistServer implements ContentGenerator {
responseType: 'json',
body: JSON.stringify(req),
signal,
agent: this.httpsAgent,
});
return res.data;
}
@@ -322,6 +328,7 @@ export class CodeAssistServer implements ContentGenerator {
},
responseType: 'json',
signal,
agent: this.httpsAgent,
});
return res.data;
}
@@ -352,6 +359,7 @@ export class CodeAssistServer implements ContentGenerator {
responseType: 'stream',
body: JSON.stringify(req),
signal,
agent: this.httpsAgent,
});
return (async function* (): AsyncGenerator<T> {