We already handled the case where an ingest had completed. This makes it so that any ongoing ingests also should reuse the existing operation
Co-authored-by: Copilot <copilot@github.com>
* telemetry: add workspaceChunkSearch.tryInit event for cold-init tracking
Adds telemetry to track duration and outcome of workspace chunk search
cold initialization (getPreferredType + service creation). Records
success, noEmbeddingType, alreadyInitialized, or error outcomes.
Not fired for fast paths (no auth, already initialized).
Related: microsoft/vscode#313070
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: type outcome as string literal union per review
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* handle steering the way the SDK wants it (via priority)
* pass along properties via the queued request (rather than setting them when we get the message) so that we can set them when the message is to be yielded to the SDK
* Tons of code simplification
There's still more simplification to do... but this is getting unwieldy so let's start here.
Co-authored-by: Copilot <copilot@github.com>
* feat: add compareBranch to TitleAndDescriptionProvider for enhanced PR context
* feat: enhance PR description to include escaped compare branch name
* Update extensions/copilot/src/extension/prompts/node/github/pullRequestDescriptionPrompt.tsx
Co-authored-by: Alex Ross <38270282+alexr00@users.noreply.github.com>
* feat: update pull request user message to include escaped compare branch name
---------
Co-authored-by: Alex Ross <38270282+alexr00@users.noreply.github.com>
- Wrap GenAiAttr.TOOL_DEFINITIONS / tools_available toolDefinitions in truncateForOTel to avoid exceeding the 64KB OTel attribute cap with large tool catalogs.
- Drop misleading tool_search variant from toToolDefinitions JSDoc; the implementation requires a name and emits type:'function', so OpenAI client-side tool_search entries are intentionally skipped.
The router decision restricted event logs candidateModels (router
output) but not the input model pool sent to the router. Without
this field we cannot determine whether per-SKU CoGS differences
come from different input pools vs different routing decisions.
Add availableModels as a JSON-stringified array of the model
identifiers passed in the available_models request body field.
- toolCallingLoop emits tool definitions with parameters (tool inputSchema) on the agent span and tools_available event, per OTel GenAI semantic conventions (fixes#300318).
- chatMLFetcher and BYOK providers (anthropic, gemini) now also set gen_ai.tool.definitions on each chat {model} child span so trace viewers can render the tool catalog per LLM call (fixes#299934).
- toToolDefinitions normalizer extended to handle OpenAI Responses API, Anthropic input_schema, and VS Code inputSchema shapes.
The CLI runtime is migrating from the vendor-prefixed
github.copilot.time_to_first_chunk attribute to the OTel GenAI
semconv attribute gen_ai.response.time_to_first_chunk. Both encode
TTFT in seconds. The sqlite store's _ttftMs() now reads either
name (preferring the new one) so we keep populating ttft_ms before,
during, and after the runtime rollout.
Adds two unit tests: one for the new attribute alone, one verifying
the new attribute wins when both are present.
Refs:
https://github.com/open-telemetry/semantic-conventions/pull/3607https://github.com/github/copilot-agent-runtime/pull/6949
- TraceContext now carries optional traceFlags + traceState (W3C); the real
OTel impl populates them so the built traceparent reflects the upstream
sampling decision instead of hardcoding '01'.
- toolsService: build traceparent with the actual flag, forward tracestate.
- extHostLanguageModelTools.$invokeTool: deliver traceparent/tracestate to
extension-implemented tools for symmetry with outbound $invokeTool.
- Reword toolsService comment so it matches the unconditional behavior.
Plumb the active execute_tool span's W3C traceparent through
LanguageModelToolInvocationOptions and IMcpToolCallContext, then inject
it into the JSON-RPC tools/call payload's _meta so MCP server-side spans
can be parented to the client trace.
Refs #302301
* fix: handle BudgetExceededError after background compaction re-render
When the initial render throws BudgetExceededError and a completed
background compaction is applied, the re-render was unprotected. If
the compacted prompt still exceeds the budget (e.g. many MCP tools
consuming token space, or cache breakpoints preventing pruning), the
BudgetExceededError propagated uncaught and crashed the chat with
'No lowest priority node found'.
Now the re-render is wrapped in a try-catch that falls back to
renderWithoutSummarization (full budget, no cache breakpoints) on
BudgetExceededError, with telemetry outcome 'appliedButReRenderFailed'
to track how often this path is hit.
Fixes#311407
* fix: update telemetry for background compaction outcomes and re-render handling