ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* API Keys — провайдер языковых моделей для встроенного чата.
* Каждый здоровый ключ (ok, без высокого пинга) появляется в списке моделей
* чата как BYOK-модель; запросы уходят на его OpenAI-совместимый эндпоинт.
* Поддерживает tool calling: options.tools уходят в запрос, tool_calls из ответа
* возвращаются партами { type: 'tool_use' } для цикла агента.
*--------------------------------------------------------------------------------------------*/
import { Emitter, Event } from '../../../../base/common/event.js';
import { CancellationToken } from '../../../../base/common/cancellation.js';
import { ExtensionIdentifier } from '../../../../platform/extensions/common/extensions.js';
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
import {
ILanguageModelChatProvider, ILanguageModelChatMetadataAndIdentifier, ILanguageModelChatResponse,
ILanguageModelChatRequestOptions, ILanguageModelChatInfoOptions, ILanguageModelChatMetadata,
IChatMessage, IChatResponsePart,
} from '../../chat/common/languageModels.js'
IAuraApiKeysService IAuraApiKey
describeNetworkFailure describeSlowDecision describeStreamStall hasFasterAlternative
isNetworkFailure routerLimits slowThresholdMs bestMedianLatency medianLatency
agggBoostActive agggBoostPrompt
ILogService
phase waitedMs
phase waitedMs
name
description
inputSchema
kind text
kind id name input
kind id text isError
role
content INormalizedContent
id
name
args
toolBuffers Map IOpenAIToolCallBuffer
_onDidChange
onDidChange Event _onDidChangeevent
keysService IAuraApiKeysService
configurationService IConfigurationService
logService ILogService
keysService _onDidChange
keysService _onDidChange
IAuraApiKey
keysServicek
kenabled
s keysServicekid
sok sexcludedHighPing
_options ILanguageModelChatInfoOptions _token CancellationToken ILanguageModelChatMetadataAndIdentifier
key
identifier
metadata ILanguageModelChatMetadata
extension
name
id keyid
vendor
version
family keymodel
maxInputTokens
maxOutputTokens
isDefaultForLocation
isUserSelectable
isBYOK
tooltip
capabilities toolCalling agentMode
identifier metadata
messages IChatMessage INormalizedMessage
out INormalizedMessage
m messages
role INormalizedMessage mrole mrole
content INormalizedContent
part mcontent
parttype partvalue
content kind text partvalue
parttype
content kind id parttoolCallId name partname input partparameters
parttype
text partvalue
v v type value type v value value
Boolean
content kind id parttoolCallId text text isError partisError
contentlength
prev out
prev prevrole role
prevcontentcontent
out role content
out
modelId messages IChatMessage _from ExtensionIdentifier options ILanguageModelChatRequestOptions token CancellationToken ILanguageModelChatResponse
selectedKeyId modelId modelIdlength modelId
routed keysServiceselectedKeyId
explicit keysServicek kid selectedKeyId kenabled
preferred explicit routed
preferred
keysServicelength
candidates IAuraApiKey preferred k kid preferredid
systemPrompt configurationService
normalized messages
systemParts INormalizedMessage
configurationService
systemParts role content kind text agggBoostPromptcurrent
systemPrompt
systemParts role content kind text systemPrompt
conversation systemParts normalized
tools ILMToolSpec options tools tools options tools ILMToolSpec tools
controller
cancellationListener token controller
self
resolveResult v
rejectResult e
result res rej resolveResult res rejectResult rej
buildRequest key IAuraApiKey secret url headers Record body
base keybaseUrl
keyprovider
system conversationm mrole m mcontentc ckind c c text text
anthropicMessages conversationm mrole m
role mrole
content mcontentc
ckind type text ctext
ckind type id cid name cname input cinput
type tool_use_id cid content ctext cisError is_error
anthropicTools toolslength toolst name tname description tdescription input_schema tinputSchema type properties
url
headers
secret secret
body model keymodel system system messages anthropicMessages stream max_tokens anthropicTools tools anthropicTools
keyprovider
system conversationm mrole m mcontentc ckind c c text text
googleContents conversationm mrole m
role mrole
parts mcontentc
ckind text ctext
ckind text
text
url
headers
body
system systemInstruction parts text system
contents googleContents
openaiMessages Record
m conversation
mrole
openaiMessages role content mcontentc ckind c c text text
mrole
text mcontentc ckind c c text text
text openaiMessages role content text
c mcontent
ckind
openaiMessages role tool_call_id cid content cisError ctext
text mcontentc ckind c c text text
toolCalls mcontentc ckind
msg Record role content text
toolCallslength
msgtool_calls toolCallsc
id c id id
type
name c name name arguments c input input
openaiMessagesmsg
openaiTools toolslength toolst type name tname description tdescription parameters tinputSchema type properties
url
headers
secret
body model keymodel messages openaiMessages stream openaiTools tools openaiTools tool_choice
extractStreamParts key IAuraApiKey json Record state IStreamParseState IChatResponsePart
parts IChatResponsePart
keyprovider
type json
type
block jsoncontent_block type id name
blocktype
statetoolBuffersjsonindex id blockid name blockname args
type
delta jsondelta type text partial_json
deltatype deltatext
parts type value deltatext
deltatype deltapartial_json
buf statetoolBuffersjsonindex
buf bufargs deltapartial_json
type
idx jsonindex
buf statetoolBuffersidx
buf
statetoolBuffersidx
partsbuf
parts
keyprovider
textParts jsoncandidates content parts text contentparts
textParts
value textPartsp ptext ptext
value parts type value
parts
choice jsonchoices delta content tool_calls index id name arguments
choicedeltacontent choicedeltacontent
parts type value choicedeltacontent
call choicedeltatool_calls
idx callindex callindex
buf statetoolBuffersidx id name args
callid bufid callid
callfunctionname bufname callfunctionname
callfunctionarguments bufargs callfunctionarguments
statetoolBuffersidx buf
parts
toToolUsePart buf IOpenAIToolCallBuffer IChatResponsePart
parameters
parameters bufargs
type name bufname toolCallId bufid parameters
flushToolBuffers state IStreamParseState IChatResponsePart
parts IChatResponsePart
idx statetoolBuffersa b a b
buf statetoolBuffersidx
bufname partsbuf
statetoolBuffers
parts
limits key selfconfigurationServicekey
key IAuraApiKey
s selfkeysServicekeyid
latencyMs slatencySamples slatencyMs pingMs spingMs
bestMedianMs candidatesk selfkeysServicekidlatencySamples
slowMs bestMedianMs limits
stream
lastError
yielded
candidateIndex candidateIndex candidateslength candidateIndex
key candidatescandidateIndex
controllersignalaborted
attempt attempt attempt
controllersignalaborted
attemptController
attemptController
controllersignalaborted controllersignal abortAttempt
attemptReader ReadableStreamDefaultReaderUint8Array
secret selfkeysServicekeyid
request key secret
selflogService
response requesturl
method
headers requestheaders
body requestbody
signal attemptControllersignal
responseok responsebody
status responsestatus
selfkeysServicekeyid status
status
status
status
attempt
r r attempt
body response
reader responsebody
attemptReader reader
decoder
parseState IStreamParseState toolBuffers
buffer
fullText
attemptStart Date
firstTokenMs
switchToFaster
maxSilenceMs firstTokenMs
Math limitsfirstTokenTimeoutMs Date attemptStart
limitsstreamGapMs
done value selfreader maxSilenceMs firstTokenMs
done
firstTokenMs
firstTokenMs Date attemptStart
selfkeysServicekeyid firstTokenMs
firstTokenMs slowMs yielded
latencyMs firstTokenMs pingMs selfkeysServicekeyidpingMs
candidatescandidateIndex speedHint
slowMs
selflogService
switchToFaster
switchToFaster
buffer decodervalue stream
lines buffer
buffer lines
line lines
trimmedLine line
trimmedLine
payload trimmedLine
payload
json payload
part key json parseState
parttype fullText partvalue
yielded
part
switchToFaster
reader
lastError
part parseState
yielded
part
fullText
cancellationListener
e
cancelled controllersignalaborted
stall cancelled e
network cancelled stall e
stall
selfkeysServicekeyid ewaitedMs
selfkeysServicekeyid ephase ewaitedMs
yielded attemptReader
network
selfkeysServicekeyid e
yielded
attemptController
interrupted stall
network
e
cancellationListener
interrupted
interrupted
lastError stall
network
e
controllersignal abortAttempt
err lastError
candidateslength controllersignalaborted
lastError
err
cancellationListener
err
stream result
reader ReadableStreamDefaultReaderUint8Array maxSilenceMs phase ReadableStreamReadResultUint8Array
maxSilenceMs
reader
timer ReturnType setTimeout
silence _ reject
timer phase maxSilenceMs maxSilenceMs
reader silence
timer timer
_modelId message IChatMessage _token CancellationToken
text message
message
messagecontentp p value value
Mathtextlength