Compatibility Matrix

Provider and framework adaptation rules. How to port any product between OpenAI, Anthropic, Cursor, and LangGraph without breaking contracts.

OpenAIAnthropicCursorLangChainLangGraph

Feature support matrix

FeatureOpenAIAnthropicCursorLangChain
System prompt✅ messages[system]✅ system param✅ .cursorrules / Rules✅ SystemMessage
Skill invocation✅ function_call / tool_call✅ tool_use block✅ /skill-name syntax✅ @tool decorator
Structured output✅ response_format: json_object✅ tool_use + input_schema⚠️ Prompt-enforced only✅ with_structured_output()
Multi-step agents✅ Assistants API / Swarm✅ claude-agent-sdk✅ Sub-agents via Agent tool✅ LangGraph StateGraph
Streaming✅ stream=True✅ stream=True✅ Native (IDE)✅ .stream()
Tool use / function calling✅ tools[]✅ tools[]⚠️ Via Agent tool only✅ bind_tools()
Context window (max)200K (o3), 128K (4o)200K (Claude 4)Varies by modelVaries by model
Image / multimodal✅ GPT-4o✅ Claude 3+✅ Via model✅ Via model

✅ = full support, ⚠️ = partial/workaround required, ❌ = not supported

Porting between providers

OpenAI → Anthropic
  • Move messages[0].role="system" content to the system parameter
  • Convert function_call definitions to Anthropic tools format (input_schema is JSON Schema)
  • Replace role: "tool" messages with role: "user" with tool_result blocks
  • Remove response_format: json_object — use a tool with structured input_schema instead
Anthropic → OpenAI
  • Move the system parameter to messages[0] with role: "system"
  • Convert tool_use blocks to OpenAI function format
  • Rename input_schemaparameters in tool definitions
  • Use response_format: json_object if structured output is needed without tool use
API → Cursor / Claude Code
  • System prompts become CLAUDE.md or .cursorrules files
  • Tool definitions become skill files installed to .claude/skills/
  • Remove JSON output format enforcement — IDE agents respond in natural language by default
  • Multi-step pipelines become sequential prompts in an IDE session

Model selection guide

Use caseRecommended modelNotes
Complex agents, multi-step reasoningclaude-opus-4-6 / o3Best capability, higher cost
High-volume production pipelinesclaude-sonnet-4-6 / gpt-4oBalanced speed + capability
Simple prompts, fast classificationclaude-haiku-4-5 / gpt-4o-miniLowest latency + cost
Code generation, IDE agentsclaude-sonnet-4-6 (Claude Code)Best code + tool-use combo
Trading execution agentsclaude-opus-4-6 or o3Use most capable model for high-stakes decisions

Known limitations

CursorNo programmatic tool routing — all tool use is mediated by the IDE's agent loop
LangChainPrompt template syntax ({{variable}}) conflicts with Python format strings — use template variables or escape braces
OpenAI AssistantsAssistants persist conversation state across runs — reset thread ID between independent tasks
AllModel outputs are non-deterministic — do not rely on exact output format without schema validation or structured output mode

Next steps