Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

openai-sdk changedcli-sdks-libraries/libraries/openai-sdk

Nearest release: v2.1.308, published 2 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+21added
Lines−21removed
From line 1 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits12to this page, all time

The whole hunk

from line 1, old and new numbered
/
lines
from line 1
11---
22title: OpenAI SDK compatibility
33url: https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/openai-sdk
4description: Anthropic provides a compatibility layer that lets you use the OpenAI SDK to test the Claude API. With a few code changes, you can quickly evaluate Anthropic model capabilities.
4description: Anthropic provides a compatibility layer that lets you use the OpenAI SDK to test the Claude API. With a few code changes, you can evaluate Anthropic model capabilities.
55---
66 
77<Note>
from line 22
2222 
23231. Use an official OpenAI SDK.
2424 
252. Change the following
252. Change the following:
2626 
27 * Update your base URL to point to the Claude API
28 * Replace your API key with a [Claude API key](https://platform.claude.com/settings/keys) from the Claude Console
29 * If your key is a [personal or service account key](https://platform.claude.com/docs/en/manage-claude/authentication#key-types) that isn't scoped to a workspace, also send the `anthropic-workspace-id` header on every request (for example, `default_headers` in the Python SDK or `defaultHeaders` in TypeScript); see [Select a workspace](https://platform.claude.com/docs/en/manage-claude/authentication#select-a-workspace)
30 * Update your model name to use a [Claude model](https://platform.claude.com/docs/en/models/overview)
27 * Update your base URL to point to the Claude API.
28 * Replace your API key with a [Claude API key](https://platform.claude.com/settings/keys) from the Claude Console.
29 * If your key is a [personal or service account key](https://platform.claude.com/docs/en/manage-claude/authentication#key-types) that isn't scoped to a workspace, also send the `anthropic-workspace-id` header on every request (for example, `default_headers` in the Python SDK or `defaultHeaders` in TypeScript); see [Select a workspace](https://platform.claude.com/docs/en/manage-claude/authentication#select-a-workspace).
30 * Update your model name to use a [Claude model](https://platform.claude.com/docs/en/models/overview).
3131 
32323. Review the following sections for what features are supported.
3333 
from line 183
183183 
184184Here are the most substantial differences from using OpenAI:
185185 
186* The `strict` parameter for function calling is ignored, which means the tool use JSON is not guaranteed to follow the supplied schema. For guaranteed schema conformance, use the native [Claude API with Structured Outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs).
186* The `strict` parameter for function calling is ignored, which means the tool use JSON is not guaranteed to follow the supplied schema. For guaranteed schema conformance, use the native [Claude API with structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs).
187187* Audio input is not supported; it is ignored and stripped from input.
188188* Prompt caching is not supported, but it is supported in the [Anthropic SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview).
189189* System/developer messages are hoisted and concatenated into the top-level `system` field, wherever they appear in the conversation. To add system instructions partway through a conversation, use [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) in the native Claude API.
from line 297
297297| `n` | Must be exactly 1 |
298298| `logprobs` | Ignored |
299299| `metadata` | Ignored |
300| `response_format` | Ignored. For JSON output, use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) with the native Claude API |
300| `response_format` | Ignored. For JSON output, use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) with the native Claude API. |
301301| `prediction` | Ignored |
302302| `presence_penalty` | Ignored |
303303| `frequency_penalty` | Ignored |
from line 318
318318 <Tab title="Tools">
319319 `tools[n].function` fields
320320 
321 | Field | Support status |
322 | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
323 | `name` | Fully supported |
324 | `description` | Fully supported |
325 | `parameters` | Fully supported |
326 | `strict` | Ignored. Use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) with the native Claude API for strict schema validation |
321 | Field | Support status |
322 | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
323 | `name` | Fully supported |
324 | `description` | Fully supported |
325 | `parameters` | Fully supported |
326 | `strict` | Ignored. Use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) with the native Claude API for strict schema validation. |
327327 </Tab>
328328 
329329 <Tab title="Functions">
from line 333
333333 OpenAI has deprecated the `functions` field and recommends using `tools` instead.
334334 </Info>
335335 
336 | Field | Support status |
337 | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
338 | `name` | Fully supported |
339 | `description` | Fully supported |
340 | `parameters` | Fully supported |
341 | `strict` | Ignored. Use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) with the native Claude API for strict schema validation |
336 | Field | Support status |
337 | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
338 | `name` | Fully supported |
339 | `description` | Fully supported |
340 | `parameters` | Fully supported |
341 | `strict` | Ignored. Use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) with the native Claude API for strict schema validation. |
342342 </Tab>
343343 </Tabs>
344344</Accordion>
Feedback