Decision map
AI
Which model, integration, autonomy, modality, gateway, retrieval handoff, and AI-specific operations decisions does the workload require?
Recommendation
Start with LLM APIs
Application and platform teams building production AI features and deciding among provider APIs, SDK abstractions, bounded agents, modality-specific APIs, gateway controls, and AI-specific observability.
Scope
Use this boundary to avoid solving adjacent problems in the wrong layer.
Included
- Model and provider API selection for a measured workload
- Provider-native or provider-normalizing AI application SDK integration
- The no-agent gate and bounded model-directed agent runtime decision
- Embedding API selection with an explicit handoff to Data-owned Vector Search
- Image generation, speech recognition, and speech synthesis
- Multi-provider gateway and model-routing controls
- LLM and agent-specific traces, evaluations, token and model cost, and behavior controls
Excluded
- Primary ownership of vector storage, indexing, filtering, and retrieval architecture
- Deterministic background and scheduled workflow execution
- Generic application logging and Application Performance Monitoring
- Media storage and delivery
- A phantom workflow-orchestration Task or route
Important tools
These tools represent distinct routes inside this decision area; open the relevant Task before treating any as a default.
- OpenAI API
- Anthropic Claude API
- Google Gemini API
- Mistral AI API
- AI SDK
- Cohere Embed and Rerank
- Voyage AI
- Stability AI
- Replicate
- Deepgram
- AssemblyAI
- Google Cloud Speech-to-Text
- ElevenLabs
- Cartesia
- OpenAI Agents SDK
- LangGraph
- CrewAI
- Mastra
- Portkey
- LiteLLM
- OpenRouter
- Vercel AI Gateway
- Langfuse
- LangSmith
- Braintrust
- Arize Phoenix
Decision sequence
Make the foundational ownership decisions before adding specialized capabilities.
What workload and output modality must be evaluated?
Define text or reasoning, image, speech recognition, or speech synthesis requirements before selecting a model or provider.
Does the workflow actually require model-directed autonomy?
Stop the AI Agents branch when deterministic execution is sufficient; activate runtime, tool, guardrail, state, and human-intervention questions only after the no-agent gate passes.
Does the application need semantic representations for retrieval or comparison?
Choose Embedding APIs here, then follow the explicit cross-category handoff to Data-owned Vector Search for storage, indexing, filtering, and retrieval.
Do provider diversity, reliability, budget, policy, or behavior-evaluation needs justify production control layers?
Evaluate gateway and routing controls separately from AI-specific traces, token and cost semantics, agent behavior, and output evaluation.
Decision groups
Each Task owns a distinct user decision rather than a product feature label.
Models, representations, and integration
These Tasks choose model or embedding APIs and the application integration layer that calls them.
Modality-specific generation and recognition
These Tasks choose image generation, speech recognition, or speech synthesis models and APIs.
Autonomy and production operations
These Tasks activate only when model-directed autonomy, shared request-path controls, or AI-specific telemetry and evaluation are justified.
Common confusions
These boundaries prevent adjacent Tasks from collapsing into one generic shortlist.
- LLM APIs and AI SDKs are treated as the same provider decision.
- LLM APIs choose model and provider capability; AI SDKs choose the application integration and abstraction layer.
- Any multi-step model call is assumed to require an AI Agent.
- AI Agents activate only when model-directed autonomy is justified; deterministic work remains with existing Background Jobs or Scheduled Jobs rather than a phantom orchestration page.
- Embedding APIs and Vector Search are treated as one AI-owned Task.
- Embedding APIs create numerical representations; Data-owned Vector Search stores, indexes, filters, and retrieves them.
- Gateway analytics are assumed to cover all AI Observability needs.
- Gateways control the request path; AI Observability also covers generations, tools, handoffs, agents, token and cost semantics, and output evaluation across gateway and non-gateway calls.
- AI Observability is treated as a replacement for general Logging and Application Performance Monitoring.
- Generic telemetry remains in Observability; AI Observability adds model, token, generation, tool, agent, and evaluation semantics.
What to defer
Do not add specialized identity systems before the product has the requirement they serve.
The workflow can be implemented with deterministic application logic, jobs, or schedules.
Model-directed autonomy introduces runtime, tool, state, guardrail, evaluation, and human-intervention obligations without a justified benefit.
The application uses one provider and does not require centralized fallback, routing, rate, budget, cache, or policy controls.
A gateway adds another request-path control plane that is unnecessary until shared operational requirements exist.
The product has no image or audio workload.
Modality-specific APIs and rights, latency, streaming, storage, and safety constraints are inactive.
Related starter stacks
See how these decisions appear inside complete application starting points.
Authoritative resources
Standards and primary documentation supporting the Category boundaries.
Sources
Claim-level references used for this decision map.
- 1Model catalog
OpenAI · Accessed Official
- 2Providers and Models
Vercel AI SDK · Accessed Official
- 3Tools
Vercel AI SDK · Accessed Official
- 4A practical guide to building agents
OpenAI · Accessed Official
- 5Vector embeddings
OpenAI · Accessed Official
- 6Vector search in Elasticsearch
Elastic · Accessed Official
- 7Image generation
OpenAI · Accessed Official
- 8Audio and speech
OpenAI · Accessed Official
- 9AI Gateway overview
Cloudflare · Accessed Official
- 10Dynamic routing
Cloudflare · Accessed Official
- 11Agents SDK tracing
OpenAI · Accessed Official
- 12OpenTelemetry GenAI Semantic Conventions
OpenTelemetry · Accessed Official
- 13Generative AI metrics
OpenTelemetry · Accessed Official
- 14Signals
OpenTelemetry · Accessed Official
- 15Evaluation best practices
OpenAI · Accessed Official