MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / fetchWithTimeout

Function fetchWithTimeout

services/cloud-agent-next/src/model-validation.ts:73–82  ·  view source on GitHub ↗
(url: string, init: RequestInit)

Source from the content-addressed store, hash-verified

71function effectiveCatalogContext(input: AssertKiloModelAvailableInput): EffectiveCatalogContext {
72 return {
73 token: input.originalToken,
74 organizationId: input.env.KILOCODE_ORG_ID_OVERRIDE ?? input.originalOrganizationId,
75 feature: input.createdOnPlatform ?? 'cloud-agent',
76 };
77}
78
79function requestHeaders(context: EffectiveCatalogContext): Headers {
80 const headers = new Headers();
81 headers.set('Content-Type', 'application/json');
82 headers.set('X-KiloCode-Feature', context.feature);
83 if (context.proof) headers.set(RUNTIME_PROXY_ATTESTATION_HEADER, context.proof);
84 if (context.token) headers.set('Authorization', `Bearer ${context.token}`);
85 if (context.organizationId) {

Callers 1

validateEndpointFunction · 0.70

Calls 1

fetchFunction · 0.70

Tested by

no test coverage detected