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 { describe, expect, it, vi } from 'vitest';
import { BYOKModelCapabilities } from '../../common/byokProvider';
import { OpenRouterLMProvider } from '../openRouterProvider';
/**
* Tests for issue #324671:
* OpenRouter BYOK previously derived the context window from `top_provider.context_length`,
* which is the window of the highest-ranked provider — NOT the model's real capability
* (`context_length`). For multi-provider models this could be off by 32×. These tests
* verify the fix: the model-level `context_length` is preferred, with `top_provider`
* used only as a fallback.
*/
/** Exposes the protected `resolveModelCapabilities` for focused testing. */
class TestableOpenRouterLMProvider extends OpenRouterLMProvider {
public resolveCapabilities(modelData: unknown): BYOKModelCapabilities | undefined {
modelData
TestableOpenRouterLMProvider
logService
trace vi debug vi info vi warn vi error vi
show vi createSubLogger vi withExtraTarget vi
logServicecreateSubLoggerlogService
logServicewithExtraTargetlogService
getAPIKey vi storeAPIKey vi deleteAPIKey vi
fetch vi
logService
createInstance vi
isConfigured vi getConfig vi setConfig vi
provider
caps provider
id
name
supported_parameters
architecture input_modalities
context_length
top_provider context_length
capsmaxInputTokens
capsmaxOutputTokens
provider
caps provider
id
name
supported_parameters
context_length
top_provider context_length max_completion_tokens
capsmaxOutputTokens
capsmaxInputTokens
provider
caps provider
id
name
supported_parameters
top_provider context_length
capsmaxInputTokens
provider
caps provider
id
name
supported_parameters
context_length
top_provider context_length max_completion_tokens
capsmaxOutputTokens
capsmaxInputTokens