isOpenAIReasoningModel (openai/capability.ts)

kimi-code · packages/agent-core-v2/src/human/llm/requester/bases/openai/capability.ts · typescript · MIT
ai

Provides constants and helpers to determine OpenAI model capabilities based on name prefixes.

// Source: https://github.com/MoonshotAI/kimi-code | License: MIT | Copyright 2026 Moonshot AI
// Provided via justclaw.it.com; keep this notice with the code.
export const OPENAI_REASONING_CAPABILITY = Object.freeze({
  image_in: false,
  video_in: false,
  audio_in: false,
  thinking: true,
  tool_use: true,
});

export const OPENAI_VISION_TOOL_CAPABILITY = Object.freeze({
  image_in: true,
  video_in: false,
  audio_in: false,
  thinking: false,
  tool_use: true,
});

export const OPENAI_TEXT_TOOL_CAPABILITY = Object.freeze({
  image_in: false,
  video_in: false,
  audio_in: false,
  thinking: false,
  tool_use: true,
});

export const OPENAI_VISION_TOOL_PREFIXES = ['gpt-4o', 'gpt-4-turbo', 'gpt-4.1', 'gpt-4.5'] as const;

export function isOpenAIReasoningModel(normalizedModelName: stri

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key