Provider and framework adaptation rules. How to port any product between OpenAI, Anthropic, Cursor, and LangGraph without breaking contracts.
| Feature | OpenAI | Anthropic | Cursor | LangChain |
|---|---|---|---|---|
| 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 model | Varies by model |
| Image / multimodal | ✅ GPT-4o | ✅ Claude 3+ | ✅ Via model | ✅ Via model |
✅ = full support, ⚠️ = partial/workaround required, ❌ = not supported
messages[0].role="system" content to the system parameterfunction_call definitions to Anthropic tools format (input_schema is JSON Schema)role: "tool" messages with role: "user" with tool_result blocksresponse_format: json_object — use a tool with structured input_schema insteadsystem parameter to messages[0] with role: "system"tool_use blocks to OpenAI function formatinput_schema → parameters in tool definitionsresponse_format: json_object if structured output is needed without tool useCLAUDE.md or .cursorrules files.claude/skills/| Use case | Recommended model | Notes |
|---|---|---|
| Complex agents, multi-step reasoning | claude-opus-4-6 / o3 | Best capability, higher cost |
| High-volume production pipelines | claude-sonnet-4-6 / gpt-4o | Balanced speed + capability |
| Simple prompts, fast classification | claude-haiku-4-5 / gpt-4o-mini | Lowest latency + cost |
| Code generation, IDE agents | claude-sonnet-4-6 (Claude Code) | Best code + tool-use combo |
| Trading execution agents | claude-opus-4-6 or o3 | Use most capable model for high-stakes decisions |