Title: Quiz 4 — OpenAI, Claude, and Multi-Provider API Integration
Course: AIINFRA 300: Agentic AI & the Model Context Protocol (MCP) > Section: Week 04 — OpenAI, Claude, and Multi-Provider API Integration

Q: Anthropic's OpenAI-SDK compatibility layer is officially intended for which purpose?
- Long-term production deployment of multi-provider apps
- Testing and comparing model capabilities
- Replacing the native Messages API entirely
- Enforcing strict JSON schema output across providers
A: Testing and comparing model capabilities

Q: When you send a request through Anthropic's OpenAI compatibility layer with strict: true on a tool definition, the layer guarantees the output will conform exactly to your JSON schema.
- True
- False
A: False

Q: OpenAI's Chat Completions API allows system/developer messages to appear in which position(s) within the messages array?
- Only as the very first message
- Only as the very last message
- Anywhere — first, middle, or repeated
- System messages are not supported at all
A: Anywhere — first, middle, or repeated

Q: What does Anthropic's compatibility layer do when it receives multiple system messages at different positions in the conversation?
Feedback: Sample/expected answer: It hoists them and concatenates them into a single leading system message.

Q: If your application sends temperature=1.6 through the OpenAI compatibility layer to a Claude model, the request will fail with an error because 1.6 is out of range.
- True
- False
A: False

Q: Which of the following is unavailable when using Claude through the OpenAI compatibility layer, but available through the native Claude API?
- Returning any text response at all
- Prompt caching and full extended-thinking output
- Sending more than one message
- Using a system prompt
A: Prompt caching and full extended-thinking output

Q: In one sentence, what is an "AI gateway" (e.g., Cloudflare AI Gateway, Braintrust) and how does it differ from a thin SDK compatibility shim?
Feedback: Sample/expected answer: An AI gateway is an intelligent proxy that exposes a consistent (often OpenAI-compatible) endpoint and translates payloads into each provider's native format at runtime, decoupling app code from any single provider's SDK — unlike a thin compatibility shim, it's purpose-built infrastructure for this translation rather than a documented-as-temporary testing convenience.

Q: Which Python package would you install to get a simple, provider-agnostic agent pattern like Agent('anthropic:claude-sonnet-4-6', ...) built by the Pydantic team?
- `litellm`
- `pydantic-ai`
- `openai`
- `anthropic-sdk`
A: `pydantic-ai`