
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
ai-sdk-codex-provider
Advanced tools
The `ai-sdk-codex-provider` package provides a Codex SDK-backed provider for the [AI SDK](https://ai-sdk.dev/docs), using [`@openai/codex-sdk`](https://www.npmjs.com/package/@openai/codex-sdk) under the hood.
The ai-sdk-codex-provider package provides a Codex SDK-backed provider for the AI SDK, using @openai/codex-sdk under the hood.
Install the provider with ai:
npm i ai-sdk-codex-provider ai
If you use coding agents such as Claude Code or Cursor, we recommend adding the AI SDK skill to your repository:
npx skills add vercel/ai
You can import the default provider instance codexSdk:
import { codexSdk } from "ai-sdk-codex-provider";
Or create a customized provider instance:
import { createCodexSdk } from "ai-sdk-codex-provider";
const provider = createCodexSdk({
name: "codex-sdk",
baseURL: process.env.OPENAI_BASE_URL,
threadOptions: {
workingDirectory: process.cwd(),
sandboxMode: "read-only",
approvalPolicy: "never",
},
});
import { codexSdk } from "ai-sdk-codex-provider";
import { generateText } from "ai";
const { text } = await generateText({
model: codexSdk("gpt-5"),
prompt: "Summarize the repository state in one paragraph.",
});
console.log(text);
import { createCodexSdk } from "ai-sdk-codex-provider";
type CodexModelIds = "gpt-5.3-codex" | "gpt-5.2-codex" | (string & {});
const provider = createCodexSdk<CodexModelIds>();
provider("gpt-5.3-codex");
To refresh the generated model catalog (model ids + metadata) from upstream Codex:
bun --cwd packages/ai-sdk-codex-provider run sync:model-catalog
Read generated model metadata at runtime:
import { getCodexSdkModelInfo } from "ai-sdk-codex-provider";
const info = getCodexSdkModelInfo("gpt-5.3-codex");
console.log(info?.contextWindow);
LanguageModelV3 only.tool-call, tool-result).includeRawChunks: true in AI SDK call options to receive raw Codex ThreadEvent payloads in the stream.Audited against @openai/codex-sdk@0.101.0.
CodexOptions support: createCodexSdk(...) forwards all current CodexOptions fields. baseUrl is supported via baseURL (preferred) and baseUrl (deprecated alias). If both are provided, baseURL wins.ThreadOptions support: supported at all adapter layers:
createCodexSdk({ threadOptions: ... })codexSdk(modelId, modelSettings)providerOptions["<provider-name>"]providerOptions["<provider-name>"].threadId maps to codex.resumeThread(threadId, threadOptions).providerOptions["codex-sdk"] (canonical key) and providerOptions["<provider-name>"] (custom provider name). If both are present, custom-key values override canonical values.abortSignal maps to Codex TurnOptions.signal; AI SDK JSON response schema maps to Codex TurnOptions.outputSchema (responseFormat.name/description are mapped to schema title/description when missing).Not fully passthrough:
ThreadOptions.model is intentionally overridden by the AI SDK model id (codexSdk("<model-id>")) on every call.AI SDK call options currently not forwarded to Codex (warnings emitted):
tools, toolChoiceheaderstemperature, topP, topKmaxOutputTokensstopSequencespresencePenalty, frequencyPenaltyseedFAQs
The `ai-sdk-codex-provider` package provides a Codex SDK-backed provider for the [AI SDK](https://ai-sdk.dev/docs), using [`@openai/codex-sdk`](https://www.npmjs.com/package/@openai/codex-sdk) under the hood.
We found that ai-sdk-codex-provider demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.