Direct Model Providers

OpenAI, Anthropic, Google, open-weight models, and rate limits.

Core concepts

  1. OpenAI: GPT models plus the Agents SDK and Realtime API for voice — the most widely supported provider across every framework. OpenAI Platform Docs
  2. Anthropic: Claude models, with the Claude Agent SDK, Claude Code, and native MCP and computer-use support. Anthropic Docs
  3. Google: Gemini models, the Agent Development Kit (ADK), and the Agent2Agent (A2A) protocol Google open-sourced to the Linux Foundation. Google AI for Developers
  4. Open-weight models: Llama, DeepSeek, Qwen, and Mistral — run via a hosted provider (Together AI, Groq, Fireworks AI) or self-hosted (Ollama, vLLM) for cost, latency, or data-residency reasons. Open-weight models are especially useful when you need predictable spend, on-prem inference, or fine-tuned variants — most agent frameworks accept them through an OpenAI-compatible base URL.
  5. Rate limits & tiers: Every provider gates throughput by spend tier — understand this before you architect an agent that fires many parallel tool calls per turn. Check each vendor's limits dashboard and plan for backoff/retries when tool loops spike token usage.

What Is It?

Direct providers expose flagship models with vendor-specific features (tools, caching, batch).

Open-weight models run on separate hosts with different latency/pricing.

Each vendor documents rate limits, safety tiers, and data policies.

Why Should I Care?

Some features (computer use, native audio) appear on direct APIs first.

Compliance reviews read vendor DPAs — you need to know who processes data.

Real World Analogy

Direct provider APIs are dialing the factory line — fewer middlemen, fastest new features, but you carry separate contracts for each brand.

Visual Mental Model

text
OpenAI | Anthropic | Google | open-weight hosts

Beginner Explanation

Learn first-party SDKs for OpenAI, Anthropic, Google, and how open-weight models are hosted (Together, Groq, etc.). Watch rate limits and context windows.

Smallest Possible Example

python
import os
# client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
print("call provider SDK directly")

Common Mistakes

❌ Assuming all models support the same tool format.

Tool schemas differ; adapter layers help.

❌ No retry/backoff on 429 errors.

Agents hammer APIs; exponential backoff is mandatory.

❌ Picking the biggest model for every step.

Route simple steps to smaller models.

Real Project Example

ChatGPT, Claude, and Gemini consumer apps map to these developer APIs.

Meta Llama weights run on many hosts with different SLAs.

Build This Mini Project

Call one cheap and one premium model on the same prompt; compare cost, latency, and tool-call reliability for a simple JSON task.

Interview Question

How do you handle provider rate limits?

Exponential backoff, queue requests, reduce parallel tool loops, cache prompts where allowed, and split traffic across models or keys per vendor guidance.

Key Takeaways

  • Know vendor-specific features and limits.
  • Match model size to step difficulty.
  • Implement retries on 429/5xx.
  • Read data processing agreements.

Resources

YouTube learning

Core concepts from video walkthroughs:

The 60-second story

You are picking a power company for a workshop that runs all night. The machines are similar. The contracts are not. OpenAI is the utility most plugs already fit. GPT models, the Agents SDK, realtime voice — if a framework has one logo on the quickstart, it is often this one. You pay for the fit.

Anthropic is the utility that showed up with strong “use the computer carefully” tools: Claude, an agent SDK, Claude Code, MCP, computer use. You pick it when the work is long reading and careful tool use, not because a leaderboard told you to have a favorite.

Google is the utility next to the rest of their campus: Gemini, the Agent Development Kit, and the Agent2Agent protocol they pushed into the open. If your company already lives in that campus, the wiring is shorter.

Open-weight models — Llama, DeepSeek, Qwen, Mistral — are generators you can hear running. You rent them from Together, Groq, or Fireworks, or you park them in your own building with Ollama or vLLM. You do that for cost you can predict, for data that cannot leave, or for a fine-tune that is yours. Most frameworks will talk to them if you hand over an OpenAI-shaped URL. The plug is a compliment. The weights are the difference.

Rate limits are the breaker box. A burst of parallel tool calls is every machine starting at once. The cheap tier trips. Your agent then retries, which is a second surge, which is how a polite backoff becomes a requirement instead of a blog tip. Read the tier before you design a fan-out.

Map the utilities.

  • OpenAI is the plug most kits expect.
  • Anthropic is the careful long-reading contract.
  • Google is the campus next door, with A2A in the hallway.
  • Open-weight is a generator you can host or rent.
  • An OpenAI-compatible URL is a standard plug on a different generator.
  • A rate limit is the breaker.
text
client = OpenAI(base_url=gateway_or_local, api_key=key)

One constructor, different buildings behind it. That line is why provider choice is not a rewrite if you kept the edge thin.

Direct providers exist because someone has to run the model. Gateways exist later, when you are tired of hardcoding one contract. On this page you learn the contracts. You do not pretend they are interchangeable in price, tools, or voice.

Mental model: power companies and a breaker box. The agent is the workshop. The provider is who keeps the lights on. Parallel tools are how you trip the breaker if you never looked at the panel.

You can explain the page by naming what each major vendor is unusually good at shipping, and by saying open-weight means you might own the generator.

Threads in the same domain as this chapter — go deeper on iHateReading without leaving the roadmap.

OpenAI DevDay 2026 for builders cover

OpenAI DevDay 2026 for builders

Dots distribution, Sign in with ChatGPT, and the trigger–decision–action loop.

Jev, explained like you're five (then like you're building with it) cover

Jev, explained like you're five (then like you're building with it)

System One decision models for fast, typed judgments inside software.

Python AI agent SDKs in 2026: OpenAI vs Pydantic-AI vs smolagents vs Strands cover

Python AI agent SDKs in 2026: OpenAI vs Pydantic-AI vs smolagents vs Strands

Same three-tool agent in four frameworks — pick by execution model and testing needs.