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 type Anthropic from '@anthropic-ai/sdk';
import type * as http from 'http';
/**
* Anthropic-error helpers shared by the proxy. Two shapes:
*
* - **Proxy-authored errors**: synthesized by the proxy when no upstream
* response exists (auth failure, bad route, malformed body, model
* parse failure, `count_tokens`). Sent as a JSON body or an SSE error
* frame.
* - **CAPI errors** (passthrough): a `CopilotApiError` already carries
* the upstream `Anthropic.ErrorResponse`. The proxy re-emits it
* verbatim — see `claudeProxyService.ts` for that branch.
*/
/**
* Build a synthetic Anthropic error envelope. `request_id` is `null`
* because the proxy authored this error itself (no upstream request was
* made, or the upstream request didn't supply one).
*/
export function buildErrorEnvelope(type: Anthropic.ErrorType, message: string): Anthropic.ErrorResponse {
return {
type: 'error',
error: { type, message
request_id
res httpServerResponse
status
type AnthropicErrorType
message
resstatus
restype message
res httpServerResponse
status
envelope AnthropicErrorResponse
resstatus
resenvelope
envelope AnthropicErrorResponse