MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / resolveMaxContextSize

Function resolveMaxContextSize

packages/oauth/src/custom-registry.ts:257–267  ·  view source on GitHub ↗
(model: CustomRegistryModelEntry)

Source from the content-addressed store, hash-verified

255}
256
257function resolveMaxContextSize(model: CustomRegistryModelEntry): number {
258 const context = model.limit?.context;
259 const output = model.limit?.output;
260 if (typeof context === 'number' && Number.isInteger(context) && context > 0) {
261 return context;
262 }
263 if (typeof output === 'number' && Number.isInteger(output) && output > 0) {
264 return output;
265 }
266 return CUSTOM_REGISTRY_DEFAULT_MAX_CONTEXT;
267}
268
269function resolveCapabilities(model: CustomRegistryModelEntry): string[] {
270 if (hasRichCapabilityHints(model)) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected