fix(logging): Add interactionId to header of Cody Client requests for autoCompletes and autoEdits #25926
Annotations
3 errors and 1 warning
Run pnpm run test:unit --run:
vscode/src/autoedits/adapters/cody-gateway.test.ts#L60
AssertionError: expected "spy" to be called with arguments: [ …(2) ]
Received:
1st spy call:
Array [
"https://test-gateway.sourcegraph.com/v1/completions",
Object {
- "body": StringContaining "\"model\":\"anthropic/claude-2\"",
+ "body": "{\"stream\":false,\"model\":\"anthropic/claude-2\",\"temperature\":0,\"max_tokens\":515,\"response_format\":{\"type\":\"text\"},\"prediction\":{\"type\":\"content\",\"content\":\"const x = 1\"},\"rewrite_speculation\":true,\"user\":\"test-user\",\"messages\":[{\"role\":\"system\",\"content\":\"system message\"},{\"role\":\"user\",\"content\":\"user message\"}]}",
"headers": Object {
- "Authorization": StringContaining "sgd_",
+ "Authorization": "***",
"Content-Type": "application/json",
"X-Sourcegraph-Feature": "code_completions",
+ "X-Sourcegraph-Interaction-ID": "test-request-id",
},
"method": "POST",
},
]
Number of calls: 1
❯ src/autoedits/adapters/cody-gateway.test.ts:60:27
|
Run pnpm run test:unit --run:
vscode/src/autoedits/adapters/fireworks.test.ts#L54
AssertionError: expected "spy" to be called with arguments: [ …(2) ]
Received:
1st spy call:
Array [
"https://api.fireworks.ai/v1/completions",
Object {
- "body": StringContaining "\"model\":\"accounts/fireworks/models/llama-v2-7b\"",
+ "body": "{\"stream\":false,\"model\":\"accounts/fireworks/models/llama-v2-7b\",\"temperature\":0,\"max_tokens\":515,\"response_format\":{\"type\":\"text\"},\"prediction\":{\"type\":\"content\",\"content\":\"const x = 1\"},\"user\":\"test-user\",\"messages\":[{\"role\":\"system\",\"content\":\"system message\"},{\"role\":\"user\",\"content\":\"user message\"}]}",
"headers": Object {
"Authorization": "***",
"Content-Type": "application/json",
+ "X-Sourcegraph-Interaction-ID": "test-request-id",
},
"method": "POST",
},
]
Number of calls: 1
❯ src/autoedits/adapters/fireworks.test.ts:54:27
|
Run pnpm run test:unit --run
Process completed with exit code 1.
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Loading