Intent of copilotApiService.ts ×1
All 83 exact tests in this concept. Every test is marked by where it enters the hierarchy.
-
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/83 tests-
platform/83 tests-
agentHost/83 tests-
test/83 tests-
node/83 tests-
shared/83 tests-
copilotApiService.test|title=CopilotApiService Endpoint Discovery uses endpoints.api from the /1 test -
copilotApiService.test|title=CopilotApiService Shared Behavior streaming and non-streaming hit the same /1 test -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Cancellation cancels the underlying SSE stream after message_stop terminates the generator|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Cancellation cancels the underlying SSE stream when the consumer breaks early|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Cancellation cancels the underlying SSE stream when the generator throws|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Cancellation does not forward AbortSignal to the shared token mint fetch|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Cancellation forwards AbortSignal to fetch for messages|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Cancellation forwards AbortSignal to fetch for models|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract 401 still invalidates the cached token (regression)|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract SSE error frame missing message: defaults to "Unknown streaming error"|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract SSE error frame missing type: defaults to api_error|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract SSE error frame with conforming envelope is preserved verbatim (extra fields propagate)|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract SSE error frame with full envelope: passthrough type and message|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract SSE error frame with unstructured-string error: uses the string as message|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract error message never embeds auth tokens|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract models() non-2xx throws typed error with synthesized envelope|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract models() non-2xx with conforming Anthropic envelope: passthrough verbatim|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract non-2xx with conforming Anthropic envelope: passthrough verbatim|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract non-2xx with empty body: synthesizes api_error envelope using status text|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract non-2xx with non-Anthropic JSON body: synthesizes api_error envelope|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService CopilotApiError contract non-2xx with plain-text body: synthesizes api_error envelope using body|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery CAPI URL override (VSCODE_AGENT_HOST_CAPI_URL_OVERRIDE) a non-loopback override is ignored and normal discovery runs (no token leak)|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery discovers independently for concurrent requests with different github tokens|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery does not double-discover when concurrent requests race on first call|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery does not re-discover when the cache is still warm for the same token|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery error from CAPI does not include the github token|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery falls back to default API base when endpoints.api is missing|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery in-flight discovery dedup spans concurrent messages + models calls|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery invalidates cached endpoint discovery on 401 from messages so the next call re-discovers|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery invalidates cached endpoint discovery on 403 from models so the next call re-discovers|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery re-discovers endpoints when the github token changes|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery reuses cached endpoint discovery for consecutive calls with same github token|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery reuses endpoint discovery when resolving the GitHub login|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery routes endpoint discovery to the GitHub Enterprise host when configured|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery runs endpoint discovery on first request|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Endpoint Discovery sends the github token as a Bearer Authorization header to the discovery endpoint|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Models caller-supplied headers cannot override Authorization in models()|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Models returns empty array when data is missing|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Models returns models from the data array|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Models reuses cached token across messages and models calls|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Models routes to the models endpoint URL|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Models sends Bearer token in Authorization header|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Models suppressIntegrationId opt-in controls the Copilot-Integration-Id header|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Models throws on non-200 response|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Non-Streaming Responses concatenates multiple text blocks|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Non-Streaming Responses returns empty string when no text blocks are present|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Non-Streaming Responses returns text content from a single text block|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Non-Streaming Responses returns the stop reason|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Non-Streaming Responses skips non-text content blocks (tool_use, thinking)|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Non-Streaming Responses stop_reason is null when missing from server response|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Non-Streaming Responses throws on 429 rate limit|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Non-Streaming Responses throws on 500 server error|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Raw Event Stream (messages()) message_stop is the last yielded event|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Raw Event Stream (messages()) stops after message_stop even if extra SSE data follows|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Raw Event Stream (messages()) tool_use block events round-trip through messages()|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Raw Event Stream (messages()) yields all six protocol event types in order|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Raw Event Stream (messages()) yields input_json_delta events|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Raw Event Stream (messages()) yields message_delta with stop_reason payload|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Raw Event Stream (messages()) yields thinking_delta events (not filtered by messages())|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format caller-supplied headers cannot override security-sensitive standard headers|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format defaults to non-streaming when stream is omitted|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format merges caller-provided headers into the request|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format non-streaming sends stream=false in the body|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format omits system field entirely when not provided|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format passes messages through as-is|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format sends correct CAPI headers|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format sends max_tokens in the body|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format sends model in the body|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format sends system as a top-level text-block array|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format streaming sends stream=true in the body|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Request Format suppressIntegrationId opt-in controls the Copilot-Integration-Id header|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Shared Behavior both modes share the same cached copilot token|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses handles a data line split right at the newline boundary|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses handles data split across multiple network chunks|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses handles many small deltas|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses skips event: lines, comment lines, and blank lines|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses survives malformed JSON in the stream (skips the line)|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses throws on error event with message|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses throws on error event without message|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses throws on non-200 CAPI response|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses throws when response has no body|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService Streaming Responses yields text deltas from content_block_delta events|occurrence=1 -
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/shared/copilotApiService.test|title=CopilotApiService combines internal organizations from the Copilot token with login from user discovery|occurrence=1
-
-
-
-
-
-