ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as l10n from '@vscode/l10n';
import { Raw } from '@vscode/prompt-tsx';
import type { OpenAI } from 'openai';
import { Response } from '../../../platform/networking/common/fetcherService';
import { coalesce } from '../../../util/vs/base/common/arrays';
import { AsyncIterableObject } from '../../../util/vs/base/common/async';
import { binaryIndexOf } from '../../../util/vs/base/common/buffer';
import { Lazy } from
SSEParser
isDefined
generateUuid
IInstantiationService ServicesAccessor
ChatLocation
ConfigKey IConfigurationService
ILogService
FinishedCallback getRequestId IResponseDelta OpenAiFunctionTool OpenAiResponsesFunctionTool OpenAiToolSearchTool
IChatEndpoint ICreateEndpointBodyOptions IEndpointBody
APIErrorResponse ChatCompletion FilterReason FinishedCompletionReason modelsWithoutResponsesContextManagement openAIContextManagementCompactionType OpenAIContextManagementResponse rawMessageToCAPI TokenLogProb
IToolDeferralService
sendEngineMessagesTelemetry sendResponsesApiCompactionTelemetry
IChatWebSocketManager
IExperimentationService
ITelemetryService
TelemetryData
getVerbosityForModelSync modelSupportCacheBreakPoints
rawPartAsCompactionData
rawPartAsPhaseData
getIndexOfStatefulMarker getStatefulMarkerAndIndex
rawPartAsThinkingData
createResponsesStreamDumper
configService IConfigurationService expService IExperimentationService endpoint IChatEndpoint
contextManagementEnabled configServiceConfigKeyResponsesApiContextManagementEnabled expService modelsWithoutResponsesContextManagementendpointfamily
contextManagementEnabled
endpointmodelMaxPromptTokens
MathendpointmodelMaxPromptTokens
configService IConfigurationService expService IExperimentationService endpoint IChatEndpoint
endpoint configServiceConfigKeyEnableGpt56Verbosity expService
accessor ServicesAccessor options ICreateEndpointBodyOptions model endpoint IChatEndpoint IEndpointBody
configService accessorIConfigurationService
expService accessorIExperimentationService
verbosity configService expService endpoint
compactThreshold configService expService endpoint
webSocketStatefulMarker accessor options model
ignoreStatefulMarker optionsignoreStatefulMarker optionsuseWebSocket
modeChanged optionsmodeChanged
toolSearchEnabled endpointsupportsToolSearch
optionsrequestOptionstoolst tfunctionname
isAllowedConversationAgent optionslocation ChatLocationAgent optionslocation ChatLocationMessagesProxy
isSubagent optionstelemetryPropertiessubType
shouldDeferTools toolSearchEnabled isAllowedConversationAgent isSubagent
toolDeferralService shouldDeferTools accessorIToolDeferralService
OpenAIResponsesFunctionTool OpenAiResponsesFunctionTool
functionTools ResponsesFunctionTool
optionsrequestOptionstools
tool optionsrequestOptionstools
toolfunctionname toolfunctionnamelength
toolfunctionname
isDeferred shouldDeferTools toolDeferralServicetoolfunctionname
isDeferred
functionTools
toolfunction
type
strict
parameters toolfunctionparameters type properties Record
finalTools ResponsesFunctionTool OpenAiToolSearchTool ClientToolSearchTool functionTools
shouldDeferTools
finalTools
type
execution
description
parameters
type
properties
query
type
description
required
ClientToolSearchTool
toolsMap optionsrequestOptionstools
optionsrequestOptionstoolst tfunctionname t
shouldLoadToolFromToolSearch shouldDeferTools name toolDeferralServicename
promptCacheBreakpointsEnabled configServiceConfigKeyResponsesApiPromptCacheBreakpointEnabled expService
modelSupportsCacheBreakpoints endpoint
supportsCacheBreakpoints promptCacheBreakpointsEnabled modelSupportsCacheBreakpoints
body IEndpointBody
model
model optionsmessages ignoreStatefulMarker webSocketStatefulMarker
toolsMap
shouldLoadToolFromToolSearch
modeChanged
supportsCacheBreakpoints
stream
tools finalToolslength finalTools
max_output_tokens optionspostOptionsmax_tokens
tool_choice optionspostOptionstool_choice
type name optionspostOptionstool_choicefunctionname
optionspostOptionstool_choice
top_logprobs optionspostOptionslogprobs
store
text verbosity verbosity
prompt_cache_options modelSupportsCacheBreakpoints mode supportsCacheBreakpoints
compactThreshold
bodycontext_management
openAIContextManagementCompactionType
compactThreshold
bodytruncation configServiceConfigKeyAdvancedUseResponsesApiTruncation
effortFromSetting configServiceConfigKeyAdvancedReasoningEffortOverride
effort endpointsupportsReasoningEffortlength
effortFromSetting optionsmodelCapabilitiesreasoningEffort
summary
effort summary
bodyreasoning
effort effort
summary summary
bodyinclude
promptCacheKeyEnabled configServiceConfigKeyResponsesApiPromptCacheKeyEnabled expService
promptCacheKeyEnabled optionsconversationId
bodyprompt_cache_key
body
body PickIEndpointBody
contextManagement bodycontext_management
contextManagement
item contextManagement
itemtype openAIContextManagementCompactionType itemcompact_threshold
itemcompact_threshold
type
text
type
role
content ResponseInputAssistantTextContentPart
phase
phase
type
execution
description
parameters Record
type
id
execution
call_id
status
arguments Record
type
execution
call_id
status
arguments Record
type
execution
call_id
status
tools ToolSearchLoadedTool
type
name
description
defer_loading
parameters object
strict
item OpenAIContextManagementResponse
outputIndex
OpenAIResponsesResponseOutputItem OpenAIContextManagementResponse
item OpenAIContextManagementResponse
outputIndex
item
output_index
response
output OpenAIResponsesResponseOutputItem
accessor ServicesAccessor options ICreateEndpointBodyOptions modelId
optionsignoreStatefulMarker optionsuseWebSocket optionsconversationId
wsManager accessorIChatWebSocketManager
connectionKey conversationId optionsconversationId modelId connectionId optionswebSocketConnectionId
connSummarizedAt wsManagerconnectionKey
optionssummarizedAtRoundId connSummarizedAt
wsManagerconnectionKey
toolsMap Map OpenAiFunctionTool
shouldLoadToolFromToolSearch name
modeChanged
supportsCacheBreakpoints
modelId messages RawChatMessage ignoreStatefulMarker webSocketStatefulMarker options RawMessagesToResponseAPIOptions input OpenAIResponsesResponseInputItem previous_response_id
toolsMap shouldLoadToolFromToolSearch modeChanged supportsCacheBreakpoints options
latestCompactionMessageIndex messages
latestCompactionMessage latestCompactionMessageIndex messageslatestCompactionMessageIndex
previousResponseId
markerIndex
webSocketStatefulMarker
markerIndex webSocketStatefulMarker messages
markerIndex
previousResponseId webSocketStatefulMarker
ignoreStatefulMarker
statefulMarkerAndIndex modelId messages
statefulMarkerAndIndex
previousResponseId statefulMarkerAndIndexstatefulMarker
markerIndex statefulMarkerAndIndexindex
modeChanged
previousResponseId
markerIndex
statefulToolCalls id name
markerIndex
markerMessage messagesmarkerIndex
markerMessagerole RawChatRoleAssistant markerMessagetoolCallslength
statefulToolCalls markerMessagetoolCallstoolCall id toolCallid name toolCallfunctionname
toolSearchCallIds
toolSearchLoadedTools
willSliceHistory markerIndex latestCompactionMessageIndex
willSliceHistory
message messages
messagerole RawChatRoleAssistant messagetoolCalls
toolCall messagetoolCalls
toolCallfunctionname
toolSearchCallIdstoolCallid
messagerole RawChatRoleTool messagetoolCallId toolSearchCallIdsmessagetoolCallId toolsMap
resultText messagecontent
c ctype RawChatCompletionContentPartKindText
c ctext
t resultText toolsMap shouldLoadToolFromToolSearch
toolSearchLoadedToolstname
markerIndex
messages messagesmarkerIndex
latestCompactionMessageIndex
latestCompactionMessageIndex markerIndex
messages messageslatestCompactionMessageIndex markerIndex
latestCompactionMessage
messages latestCompactionMessage messages
latestCompactionMessageIndex
messages messageslatestCompactionMessageIndex
sentToolResultIds messages
message message RawToolChatMessage messagerole RawChatRoleTool
message messagetoolCallId
statefulToolCalls statefulToolCallstoolCall sentToolResultIdstoolCallid
input OpenAIResponsesResponseInputItem
toolCall statefulToolCalls
toolCallname
input
type
execution
call_id toolCallid
status
tools
satisfies ResponsesToolSearchOutputInput OpenAIResponsesResponseInputItem
input
type
call_id toolCallid
output supportsCacheBreakpoints
type text
message messages
messagerole
RawChatRoleAssistant
messagecontentlength
inputmessagecontent
inputmessagecontent
asstContent messagecontentrawContentToResponsesAssistantContentisDefined
asstContentlength
assistantMessage ResponseInputAssistantMessageWithPhase
role
content asstContent
type
phase messagecontent
inputassistantMessage OpenAIResponsesResponseInputItem
messagetoolCalls
toolCall messagetoolCalls
toolCallfunctionname
toolSearchCallIdstoolCallid
parsedArgs Record
parsedArgs toolCallfunctionarguments
input
type
execution
call_id toolCallid
status
arguments parsedArgs
satisfies ResponsesToolSearchCallInput OpenAIResponsesResponseInputItem
namespace toolSearchLoadedToolstoolCallfunctionname toolCallfunctionname
input type name toolCallfunctionname arguments toolCallfunctionarguments call_id toolCallid namespace namespace
RawChatRoleTool
messagetoolCallId
toolSearchCallIdsmessagetoolCallId
resultText messagecontent
c ctype RawChatCompletionContentPartKindText
c ctext
loadedTools toolsMap resultText toolsMap shouldLoadToolFromToolSearch
t loadedTools
toolSearchLoadedToolstname
input
type
execution
call_id messagetoolCallId
status
tools loadedTools
satisfies ResponsesToolSearchOutputInput OpenAIResponsesResponseInputItem
supportsCacheBreakpoints
input
type
call_id messagetoolCallId
output messagecontent
asText messagecontent
c ctype RawChatCompletionContentPartKindText
c ctext
asImages messagecontent
c ctype RawChatCompletionContentPartKindImage
c OpenAIResponsesResponseInputImage
type
detail cimageUrldetail
image_url cimageUrlurl
asFiles messagecontent
c c RawDocumentContentPart ctype RawChatCompletionContentPartKindDocument
rawDocumentToResponsesInputFile
isDefined
input type call_id messagetoolCallId output asText
asImageslength
input type role content type text asImages
asFileslength
input type role content type text asFiles
RawChatRoleUser
input type role content messagecontent supportsCacheBreakpoints
RawChatRoleSystem
input type role content messagecontent supportsCacheBreakpoints
input previous_response_id previousResponseId
resultText toolsMap Map OpenAiFunctionTool shouldLoadToolFromToolSearch name ToolSearchLoadedTool
toolNames
toolNames resultText
toolNames
toolNames
name name name name toolsMapname shouldLoadToolFromToolSearchname
name
tool toolsMapname
type
name toolfunctionname
description toolfunctiondescription
defer_loading
parameters toolfunctionparameters type properties
strict
message RawChatMessage RawChatMessage
messagerole RawChatRoleAssistant
content messagecontentpart parttype RawChatCompletionContentPartKindOpaque part
contentlength
role RawChatRoleAssistant
content
messages RawChatMessage
idx messageslength idx idx
message messagesidx
part messagecontent
parttype RawChatCompletionContentPartKindOpaque part
idx
ExtractRawChatCompletionContentPart type RawChatCompletionContentPartKindDocument
part RawDocumentContentPart OpenAIResponsesResponseInputFile
partdocumentDatamediaType
type
filename
file_data
OpenAIResponsesResponseInputText OpenAIResponsesResponseInputImage OpenAIResponsesResponseInputFile
part RawChatCompletionContentPart ResponsesConvertibleContent
parttype
RawChatCompletionContentPartKindText
type text parttext
RawChatCompletionContentPartKindImage
type detail partimageUrldetail image_url partimageUrlurl
RawChatCompletionContentPartKindDocument
part
RawChatCompletionContentPartKindOpaque
maybeCast partvalue ResponsesConvertibleContent
maybeCasttype maybeCasttype maybeCasttype
maybeCast
part RawChatCompletionContentPart PickOpenAIResponsesResponseOutputText
parttype
RawChatCompletionContentPartKindText
parttext
type text parttext
mode
ResponsesConvertibleContent
prompt_cache_breakpoint ResponsesPromptCacheBreakpoint
promptCacheBreakpoint ResponsesPromptCacheBreakpoint mode
parts RawChatCompletionContentPart supportsCacheBreakpoints ResponsesConvertibleContent
content ResponsesCacheableContent
target ResponsesCacheableContent
part parts
parttype RawChatCompletionContentPartKindCacheBreakpoint
supportsCacheBreakpoints target
targetprompt_cache_breakpoint promptCacheBreakpoint
converted part
converted
target converted
contenttarget
target
content
id
id id
content RawChatCompletionContentPart OpenAIResponsesResponseReasoningItem
contentpart
parttype RawChatCompletionContentPartKindOpaque
thinkingData part
thinkingData thinkingDataencrypted thinkingDataid
type
id thinkingDataid
summary
encrypted_content thinkingDataencrypted
satisfies OpenAIResponsesResponseReasoningItem
content RawChatCompletionContentPart
part content
parttype RawChatCompletionContentPartKindOpaque
phase part
phase
phase
content RawChatCompletionContentPart OpenAIResponsesResponseInputItem
contentpart
parttype RawChatCompletionContentPartKindOpaque
compaction part
compaction
type openAIContextManagementCompactionType
id compactionid
encrypted_content compactionencrypted_content
OpenAIResponsesResponseInputItem
body OpenAIResponsesResponseCreateParams RawChatMessage
messages RawChatMessage
pendingFunctionCalls RawChatMessageToolCall
pendingFunctionCallslength
messages
role RawChatRoleAssistant
content
toolCalls pendingFunctionCalls
bodyinstructions
messages
role RawChatRoleSystem
content type RawChatCompletionContentPartKindText text bodyinstructions
inputItems bodyinput role content bodyinput type bodyinput
item inputItems
item
itemrole
messages
role RawChatRoleUser
content itemcontentresponseContentToRawContentisDefined
messages
role RawChatRoleSystem
content itemcontentresponseContentToRawContentisDefined
item
messages
role RawChatRoleAssistant
content itemcontentresponseOutputToRawContentisDefined
item
messages
role RawChatRoleAssistant
content itemcontentresponseContentToRawContentisDefined
item
itemtype
pendingFunctionCalls
id itemcall_id
type
name itemname
arguments itemarguments
content itemoutput
messages
role RawChatRoleTool
content
toolCallId itemcall_id
messages
role RawChatRoleAssistant
content
type RawChatCompletionContentPartKindText
text
tsItem item ResponsesToolSearchCallInput ResponsesToolSearchOutputInput
tsItemtype
pendingFunctionCalls
id tsItemcall_id
type
name
arguments tsItemarguments
tsItemtype
toolNames tsItemtoolst tname
messages
role RawChatRoleTool
content
type RawChatCompletionContentPartKindText
text toolNames
toolCallId tsItemcall_id
pendingFunctionCallslength
messages
role RawChatRoleAssistant
content
toolCalls pendingFunctionCalls
messages
item OpenAIResponsesResponseInputItem item OpenAIResponsesResponseOutputMessage
item itemrole item itemtype item itemcontent
item OpenAIResponsesResponseInputItem item OpenAIResponsesResponseInputItemMessage
item itemrole item itemtype
content OpenAIResponsesResponseInputMessageContentList OpenAIResponsesResponseInputMessageContentList
content
type text content
content
part OpenAIResponsesResponseInputContent OpenAIResponsesResponseFunctionCallOutputItem RawChatCompletionContentPart
parttype
type RawChatCompletionContentPartKindText text parttext
type RawChatCompletionContentPartKindImage
imageUrl
url partimage_url
detail partdetail
partdetail
type RawChatCompletionContentPartKindOpaque
value
part OpenAIResponsesResponseOutputText OpenAIResponsesResponseOutputRefusal RawChatCompletionContentPart
parttype
type RawChatCompletionContentPartKindText text parttext
type RawChatCompletionContentPartKindText text
output OpenAIResponsesResponseFunctionCallOutputItemList RawChatCompletionContentPart
output
type RawChatCompletionContentPartKindText text output
outputresponseContentToRawContent
value value OpenAIContextManagementResponse
value value value valuetype openAIContextManagementCompactionType
chunk OpenAIResponsesResponseStreamEvent chunk OpenAIResponsesResponseStreamEvent ResponseStreamEventWithOutputItem
chunk chunk chunkoutput_index
chunk OpenAIResponsesResponseStreamEvent chunk OpenAIResponsesResponseStreamEvent ResponseStreamEventWithResponseOutput
chunk chunkresponseoutput
chunk ResponseStreamEventWithOutputItem
chunkoutput_index
item OpenAIResponsesResponseOutputItem item CompactionResponseOutputItem
item
output OpenAIResponsesResponseOutputItem preferredOutputIndex LatestCompactionOutput
latestCompactionOutput LatestCompactionOutput
idx outputlength idx idx
item outputidx
item
latestCompactionOutput item outputIndex idx
preferredOutputIndex
preferredItem outputpreferredOutputIndex
preferredItem preferredItem latestCompactionOutput preferredOutputIndex latestCompactionOutputoutputIndex
item preferredItem outputIndex preferredOutputIndex
latestCompactionOutput
output OpenAIResponsesResponseOutputItem preferredOutputIndex OpenAIResponsesResponseOutputItem
latestCompactionOutput output preferredOutputIndex
latestCompactionOutput
output
outputitem idx item idx latestCompactionOutputoutputIndex
instantiationService IInstantiationService telemetryService ITelemetryService logService ILogService response Response expectedNumChoices finishCallback FinishedCallback telemetryData TelemetryData compactionThreshold AsyncIterableObjectChatCompletion
feed
requestId responseheaders
ghRequestId responseheaders
serverExperiments responseheaders
processor instantiationServiceOpenAIResponsesProcessor telemetryData telemetryService requestId ghRequestId serverExperiments compactionThreshold
dumper requestId logService
parser ev
logService
evdata
parsedData evdata
responseStreamEvent OpenAIResponsesResponseStreamEvent type evtype parsedData
dumperresponseStreamEvent
completion processorresponseStreamEvent finishCallback
completion
telemetryService logService completion telemetryData
feedcompletion
e
feede
chunk responsebody
parserchunk
responsebody
telemetryService ITelemetryService logService ILogService completion ChatCompletion telemetryData TelemetryData
telemetryMessage completionmessage
telemetryDataWithUsage telemetryData
completionusage
telemetryDataWithUsage telemetryData
promptTokens completionusageprompt_tokens
completionTokens completionusagecompletion_tokens
totalTokens completionusagetotal_tokens
completionusageprompt_tokens_details cachedTokens completionusageprompt_tokens_detailscached_tokens
completionusagecompletion_tokens_details
reasoningTokens completionusagecompletion_tokens_detailsreasoning_tokens
acceptedPredictionTokens completionusagecompletion_tokens_detailsaccepted_prediction_tokens
rejectedPredictionTokens completionusagecompletion_tokens_detailsrejected_prediction_tokens
telemetryService telemetryMessage telemetryDataWithUsage logService
logprobs OpenAIResponsesResponseTextDeltaEventLogprob
ResponsesResponseCompletedEvent
copilot_usage
total_nano_aiu
response OpenAIResponsesResponse
content_filters CapiContentFilterEntry
source_type
blocked
content_filter_raw action label result
content_filter_results Record filtered severity detected
filters CapiContentFilterEntry FilterReason
filters
blocked filtersf fblocked
completion blockedf fsource_type blocked
completion
blockingRule completioncontent_filter_rawr raction rresult
label blockingRulelabel
label
FilterReasonCopyright
label label
FilterReasonSelfHarm
label
FilterReasonSexual
label
FilterReasonViolence
label
FilterReasonHate
results completioncontent_filter_results
resultshatefiltered FilterReasonHate
resultsself_harmfiltered FilterReasonSelfHarm
resultssexualfiltered FilterReasonSexual
resultsviolencefiltered FilterReasonViolence
resultsprotected_material_textfiltered resultsprotected_material_codefiltered
FilterReasonCopyright
completionsource_type
FilterReasonPrompt
eventType
responseId
responseStatus
eventType response PickOpenAIResponsesResponse IResponsesErrorContext
eventType
responseId responseid
responseStatus responsestatus
code context IResponsesErrorContext
details
contextresponseStatus
contextresponseId
code
l10n code details
l10n details
err OpenAIResponsesResponseError context IResponsesErrorContext APIErrorResponse
err
code errcode errcode errcode
message errmessage errmessage errmessage
code
message message code context
metadata
code code
contextresponseId responseId contextresponseId
textAccumulator
hasReceivedReasoningSummary
sawCompactionMessage
latestCompactionOutputIndex
latestCompactionItem OpenAIContextManagementResponse
lastTextDeltaOutputIndex
toolCallInfo
telemetryData TelemetryData
telemetryService ITelemetryService
requestId
ghRequestId
serverExperiments
compactionThreshold
logService ILogService
chunk OpenAIResponsesResponseStreamEvent CompactionItemInChunk
compactionItems CompactionItemInChunk
chunk chunkitem
outputIndex chunk
compactionItems item chunkitem outputIndex
chunk
idx idx chunkresponseoutputlength idx
item chunkresponseoutputidx
item
compactionItems item outputIndex idx
compactionItems
item OpenAIContextManagementResponse outputIndex delta IResponseDelta
outputIndex latestCompactionOutputIndex outputIndex latestCompactionOutputIndex
previousCompactionItem latestCompactionItem
sawCompactionMessage
latestCompactionOutputIndex outputIndex latestCompactionOutputIndex
latestCompactionItem item
previousCompactionItemid itemid previousCompactionItemencrypted_content itemencrypted_content
text
contextManagement
type openAIContextManagementCompactionType
id itemid
encrypted_content itemencrypted_content
chunk OpenAIResponsesResponseStreamEvent _onProgress FinishedCallback ChatCompletion
onProgress delta IResponseDelta
textAccumulator deltatext
textAccumulator delta
compactionItems chunk
chunktype
item outputIndex compactionItems
item outputIndex onProgress
chunktype
text copilotErrors agent code chunkcode message chunkmessage type identifier chunkparam
output CapiResponseTerminalEvent
FinishedCompletionReasonServerError
error code chunkcode message chunkmessage OpenAIResponsesResponseError
capiChunk CapiResponsesTextDeltaEvent chunk
lastTextDeltaOutputIndex capiChunkoutput_index lastTextDeltaOutputIndex
text
lastTextDeltaOutputIndex capiChunkoutput_index
haystack capiChunkdelta
text capiChunkdelta
logprobs capiChunklogprobs
content capiChunklogprobslp
haystack lp
top_logprobs lptop_logprobsl haystack l
chunkitemtype
toolCallInfochunkoutput_index name chunkitemname callId chunkitemcall_id arguments
text
beginToolCalls name chunkitemname id chunkitemcall_id
chunkitemtype
tsItem chunkitem ResponsesToolSearchCall
tsItemexecution tsItemcall_id
toolCallInfochunkoutput_index name callId tsItemcall_id arguments
text
beginToolCalls name id tsItemcall_id
info toolCallInfochunkoutput_index
info
infoarguments chunkdelta
text
copilotToolCallStreamUpdates
id infocallId
name infoname
arguments infoarguments
chunkitemtype
toolCallInfochunkoutput_index
text
copilotToolCalls
id chunkitemcall_id
name chunkitemname
arguments chunkitemarguments
phase chunkitem ResponseOutputItemWithPhasephase
chunkitemtype
tsCall chunkitem ResponsesToolSearchCall
tsCallexecution tsCallcall_id
toolCallInfochunkoutput_index
text
copilotToolCalls
id tsCallcall_id
name
arguments tsCallarguments
chunkitemtype
text
thinking chunkitemencrypted_content
id chunkitemid
text hasReceivedReasoningSummary
chunkitemsummarys stext
encrypted chunkitemencrypted_content
chunkitemtype
text
phase chunkitem ResponseOutputItemWithPhasephase
hasReceivedReasoningSummary
text
thinking
id chunkitem_id
text chunkdelta
hasReceivedReasoningSummary
text
thinking
id chunkitem_id
metadata vscode_reasoning_summary_part_done
capiChunk chunk CapiResponseCompletedEvent
normalizedOutput capiChunkresponseoutput latestCompactionOutputIndex
latestCompactionOutput normalizedOutput latestCompactionOutputIndex
latestCompactionItem latestCompactionOutputitem
previousCompactionItem latestCompactionItem
latestCompactionItem
sawCompactionMessage
latestCompactionOutputIndex latestCompactionOutputoutputIndex
shouldEmitResolvedCompaction latestCompactionItem
previousCompactionItem
previousCompactionItemid latestCompactionItemid
previousCompactionItemencrypted_content latestCompactionItemencrypted_content
latestCompactionItem
latestCompactionItem latestCompactionItem
compactionThreshold sawCompactionMessage
promptTokens chunkresponseusageinput_tokens
totalTokens chunkresponseusagetotal_tokens
telemetryService
outcome
headerRequestId requestId
gitHubRequestId ghRequestId
model chunkresponsemodel
compactThreshold compactionThreshold
promptTokens
totalTokens
logService
compactionThreshold chunkresponseusageinput_tokens compactionThreshold
promptTokens chunkresponseusageinput_tokens
totalTokens chunkresponseusagetotal_tokens
telemetryService
outcome
headerRequestId requestId
gitHubRequestId ghRequestId
model chunkresponsemodel
compactThreshold compactionThreshold
promptTokens
totalTokens
logService
text
statefulMarker chunkresponseid
contextManagement shouldEmitResolvedCompaction latestCompactionItem
blockFinished
choiceIndex
model chunkresponsemodel
tokens
telemetryData telemetryData
requestId headerRequestId requestId gitHubRequestId ghRequestId completionId chunkresponseid created chunkresponsecreated_at deploymentId serverExperiments serverExperiments
usage
prompt_tokens chunkresponseusageinput_tokens
completion_tokens chunkresponseusageoutput_tokens
total_tokens chunkresponseusagetotal_tokens
prompt_tokens_details
cached_tokens chunkresponseusageinput_tokens_detailscached_tokens
completion_tokens_details
reasoning_tokens chunkresponseusageoutput_tokens_detailsreasoning_tokens
accepted_prediction_tokens
rejected_prediction_tokens
copilot_usage capiChunkcopilot_usagetotal_nano_aiu capiChunkcopilot_usage
finishReason FinishedCompletionReasonStop
message
role RawChatRoleAssistant
content normalizedOutputitem RawChatCompletionContentPart
itemtype
type RawChatCompletionContentPartKindText text itemcontentc ctype ctext crefusal
itemtype itemresult
type RawChatCompletionContentPartKindImage imageUrl url itemresult
isDefined
incomplete chunkresponse CapiResponseTerminalEvent
reason incompleteincomplete_detailsreason
finishReason FinishedCompletionReason
filterReason FilterReason
reason
finishReason FinishedCompletionReasonLength
reason
finishReason FinishedCompletionReasonContentFilter
filterReason incompletecontent_filters
finishReason FinishedCompletionReasonServerError
incomplete finishReason
filterReason
error incompleteerror incomplete
failed chunkresponse CapiResponseTerminalEvent
failed FinishedCompletionReasonServerError
error failederror failed
response CapiResponseTerminalEvent
finishReason FinishedCompletionReason
opts filterReason FilterReason error APIErrorResponse
ChatCompletion
output responseoutput
blockFinished
choiceIndex
model responsemodel
tokens
telemetryData telemetryData
requestId
headerRequestId requestId
gitHubRequestId ghRequestId
completionId responseid
created responsecreated_at
deploymentId
serverExperiments serverExperiments
usage responseusage
prompt_tokens responseusageinput_tokens
completion_tokens responseusageoutput_tokens
total_tokens responseusagetotal_tokens
prompt_tokens_details
cached_tokens responseusageinput_tokens_detailscached_tokens
completion_tokens_details
reasoning_tokens responseusageoutput_tokens_detailsreasoning_tokens
accepted_prediction_tokens
rejected_prediction_tokens
finishReason
filterReason optsfilterReason
error optserror
message
role RawChatRoleAssistant
content outputitem RawChatCompletionContentPart
itemtype
type RawChatCompletionContentPartKindText text itemcontentc ctype ctext crefusal
itemtype itemresult
type RawChatCompletionContentPartKindImage imageUrl url itemresult
isDefined
text LazyUint8Array lp OpenAIResponsesResponseTextDeltaEventLogprobTopLogprob TokenLogProb
bytes
lptoken
needle lptoken
haystack textvalue
idx haystack needle
idx
bytes idx idx needlelength
token lptoken
bytes
logprob lplogprob