{"_id":"@amux.ai/adapter-openai","_rev":"4-11e5a47dacf3b0c94c8f53e7f248ba13","name":"@amux.ai/adapter-openai","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.1":{"name":"@amux.ai/adapter-openai","version":"0.1.1","keywords":["amux","llm","openai","adapter"],"author":{"name":"isboyjc"},"license":"MIT","_id":"@amux.ai/adapter-openai@0.1.1","maintainers":[{"name":"isboyjc","email":"214930661@qq.com"}],"homepage":"https://github.com/isboyjc/amux#readme","bugs":{"url":"https://github.com/isboyjc/amux/issues"},"dist":{"shasum":"20fcc492bb6c893e09770ef2f2ef427a3c84d8ba","tarball":"https://registry.npmjs.org/@amux.ai/adapter-openai/-/adapter-openai-0.1.1.tgz","fileCount":7,"integrity":"sha512-pG6ADM1a6i8ZavJD9Y+yKVHyooiWTMc1RlHg+qQ0K7GBIoqEcXegIWFQciS6Z0AUNhhYYStu9pNftf94cfpfwQ==","signatures":[{"sig":"MEUCIHG2Abt8DU4jYyoDV06P8OUDt7xi4ECTNUt/IhPKQUofAiEApmVJ/sq1Q4wxI/h8nrO4LBHjQ4zgaEsE/7PRxc6m2NY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":315014},"main":"./dist/index.cjs","type":"module","_from":"file:amux.ai-adapter-openai-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"isboyjc","email":"214930661@qq.com"},"_resolved":"/private/var/folders/40/ydvkbdz503l88ck6kxydy50w0000gn/T/7b60a14d927d82944e9cd9dea21fd042/amux.ai-adapter-openai-0.1.1.tgz","_integrity":"sha512-pG6ADM1a6i8ZavJD9Y+yKVHyooiWTMc1RlHg+qQ0K7GBIoqEcXegIWFQciS6Z0AUNhhYYStu9pNftf94cfpfwQ==","repository":{"url":"git+https://github.com/isboyjc/amux.git","type":"git","directory":"packages/adapter-openai"},"_npmVersion":"10.9.2","description":"OpenAI adapter for Amux","directories":{},"_nodeVersion":"22.15.1","dependencies":{"@amux.ai/llm-bridge":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^1.2.1","typescript":"^5.3.3","@types/node":"^20.11.5"},"_npmOperationalInternal":{"tmp":"tmp/adapter-openai_0.1.1_1769284660228_0.070169050371512","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@amux.ai/adapter-openai","version":"0.1.2","keywords":["amux","llm","openai","adapter"],"author":{"name":"isboyjc"},"license":"MIT","_id":"@amux.ai/adapter-openai@0.1.2","maintainers":[{"name":"isboyjc","email":"214930661@qq.com"}],"homepage":"https://github.com/isboyjc/amux#readme","bugs":{"url":"https://github.com/isboyjc/amux/issues"},"dist":{"shasum":"74a5c469dc3e9a754bc40ee57cec0663643a03a7","tarball":"https://registry.npmjs.org/@amux.ai/adapter-openai/-/adapter-openai-0.1.2.tgz","fileCount":8,"integrity":"sha512-HmFRSgZevZmfLOd6FG8SUCi9HGlh0CRofeYWxgeNKHLREV5flLQC4QUzlU2SJZlGhMGjevm4q6MaKi+gVA/MQw==","signatures":[{"sig":"MEUCIQDu6ScwksmkcQuICnAGibBDWr3GGgzAlj0fqIN0iwjSlQIgROULFQq8mH4lH0t6yCMbtnICVY3H3ZDJ9ovRXy3pl0Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":317467},"main":"./dist/index.cjs","type":"module","_from":"file:amux.ai-adapter-openai-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"isboyjc","email":"214930661@qq.com"},"_resolved":"/private/var/folders/40/ydvkbdz503l88ck6kxydy50w0000gn/T/dae523c9b728e02503404ffbf0827dc1/amux.ai-adapter-openai-0.1.2.tgz","_integrity":"sha512-HmFRSgZevZmfLOd6FG8SUCi9HGlh0CRofeYWxgeNKHLREV5flLQC4QUzlU2SJZlGhMGjevm4q6MaKi+gVA/MQw==","repository":{"url":"git+https://github.com/isboyjc/amux.git","type":"git","directory":"packages/adapter-openai"},"_npmVersion":"10.9.2","description":"OpenAI adapter for Amux","directories":{},"_nodeVersion":"22.15.1","dependencies":{"@amux.ai/llm-bridge":"0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^1.2.1","typescript":"^5.3.3","@types/node":"^20.11.5"},"_npmOperationalInternal":{"tmp":"tmp/adapter-openai_0.1.2_1769294673417_0.826387532352945","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@amux.ai/adapter-openai","version":"0.1.3","keywords":["amux","llm","openai","adapter"],"author":{"name":"isboyjc"},"license":"MIT","_id":"@amux.ai/adapter-openai@0.1.3","maintainers":[{"name":"isboyjc","email":"214930661@qq.com"}],"homepage":"https://github.com/isboyjc/amux#readme","bugs":{"url":"https://github.com/isboyjc/amux/issues"},"dist":{"shasum":"a705e1138079235922c7c6a9d2fdfaebe8821a2f","tarball":"https://registry.npmjs.org/@amux.ai/adapter-openai/-/adapter-openai-0.1.3.tgz","fileCount":8,"integrity":"sha512-s54/zmVgHiHxczoZmrhhrZU+uQiCxNK8R0wstg+RILB4sOrwQwsnVu7pe980aFZI973mrxg891ZhCbwMIw48Ag==","signatures":[{"sig":"MEYCIQCLHHCKtEFkYQVIPBAdkhqSwEbgJ6iOuaRv0W3U+yVfmgIhAPCA7b3VD+jeiN4ORQ9UV/+itmB7IEFmaXo3yB8Rdzfl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":317467},"main":"./dist/index.cjs","type":"module","_from":"file:amux.ai-adapter-openai-0.1.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"isboyjc","email":"214930661@qq.com"},"_resolved":"/private/var/folders/40/ydvkbdz503l88ck6kxydy50w0000gn/T/71f8356c6c75a4a6d6c9d0e3b48bd3f6/amux.ai-adapter-openai-0.1.3.tgz","_integrity":"sha512-s54/zmVgHiHxczoZmrhhrZU+uQiCxNK8R0wstg+RILB4sOrwQwsnVu7pe980aFZI973mrxg891ZhCbwMIw48Ag==","repository":{"url":"git+https://github.com/isboyjc/amux.git","type":"git","directory":"packages/adapter-openai"},"_npmVersion":"10.9.2","description":"OpenAI adapter for Amux","directories":{},"_nodeVersion":"22.15.1","dependencies":{"@amux.ai/llm-bridge":"0.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^1.2.1","typescript":"^5.3.3","@types/node":"^20.11.5"},"_npmOperationalInternal":{"tmp":"tmp/adapter-openai_0.1.3_1769632643199_0.5128567326750129","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@amux.ai/adapter-openai","version":"0.1.4","description":"OpenAI adapter for Amux","keywords":["amux","llm","openai","adapter"],"repository":{"type":"git","url":"git+https://github.com/isboyjc/amux.git","directory":"packages/adapter-openai"},"homepage":"https://github.com/isboyjc/amux#readme","bugs":{"url":"https://github.com/isboyjc/amux/issues"},"license":"MIT","author":{"name":"isboyjc"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","dependencies":{"@amux.ai/llm-bridge":"0.3.2"},"devDependencies":{"@types/node":"^20.11.5","tsup":"^8.0.1","typescript":"^5.3.3","vitest":"^1.2.1"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","lint":"eslint src --ext .ts","clean":"rm -rf dist"},"_id":"@amux.ai/adapter-openai@0.1.4","_integrity":"sha512-Kkxobixvty2qRdMFBwhT/6mIIL3Mad2jON7hLJeeHkxO/JfITsz7JnTQS1Naf9I0l8SJVyv582t4utvsFU3oRQ==","_resolved":"/private/var/folders/40/ydvkbdz503l88ck6kxydy50w0000gn/T/8c6e3d91f8a5ab0d36a67722768943e8/amux.ai-adapter-openai-0.1.4.tgz","_from":"file:amux.ai-adapter-openai-0.1.4.tgz","_nodeVersion":"22.15.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Kkxobixvty2qRdMFBwhT/6mIIL3Mad2jON7hLJeeHkxO/JfITsz7JnTQS1Naf9I0l8SJVyv582t4utvsFU3oRQ==","shasum":"0c32e82ad165e2852c58ca10ed5bc65ebb4a659a","tarball":"https://registry.npmjs.org/@amux.ai/adapter-openai/-/adapter-openai-0.1.4.tgz","fileCount":8,"unpackedSize":318627,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCGTqyqwIpa2ligTdVfPg5ZE+d6TypAEBvk9JK6uDLqHQIgfuPFoef/oNUnAP77ki5KRedjjvlC4oTCADMc3C/2JwM="}]},"_npmUser":{"name":"isboyjc","email":"214930661@qq.com"},"directories":{},"maintainers":[{"name":"isboyjc","email":"214930661@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adapter-openai_0.1.4_1770213328015_0.37125782065377444"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-24T19:57:40.180Z","modified":"2026-02-04T13:55:28.309Z","0.1.1":"2026-01-24T19:57:40.372Z","0.1.2":"2026-01-24T22:44:33.569Z","0.1.3":"2026-01-28T20:37:23.359Z","0.1.4":"2026-02-04T13:55:28.179Z"},"bugs":{"url":"https://github.com/isboyjc/amux/issues"},"author":{"name":"isboyjc"},"license":"MIT","homepage":"https://github.com/isboyjc/amux#readme","keywords":["amux","llm","openai","adapter"],"repository":{"type":"git","url":"git+https://github.com/isboyjc/amux.git","directory":"packages/adapter-openai"},"description":"OpenAI adapter for Amux","maintainers":[{"name":"isboyjc","email":"214930661@qq.com"}],"readme":"# @amux.ai/adapter-openai\n\n> OpenAI adapter for Amux\n\n[![npm version](https://img.shields.io/npm/v/@amux.ai/adapter-openai.svg)](https://www.npmjs.com/package/@amux.ai/adapter-openai)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Overview\n\nOfficial OpenAI adapter for Amux, providing bidirectional conversion between OpenAI API format and Amux IR (Intermediate Representation).\n\n## Installation\n\n```bash\npnpm add @amux.ai/llm-bridge @amux.ai/adapter-openai\n# or\nnpm install @amux.ai/llm-bridge @amux.ai/adapter-openai\n```\n\n## Usage\n\n### As Inbound Adapter (Parse OpenAI format)\n\n```typescript\nimport { createBridge } from '@amux.ai/llm-bridge'\nimport { openaiAdapter } from '@amux.ai/adapter-openai'\nimport { anthropicAdapter } from '@amux.ai/adapter-anthropic'\n\nconst bridge = createBridge({\n  inbound: openaiAdapter,\n  outbound: anthropicAdapter,\n  config: {\n    apiKey: process.env.ANTHROPIC_API_KEY\n  }\n})\n\n// Send OpenAI format, receive OpenAI format\nconst response = await bridge.chat({\n  model: 'gpt-4',\n  messages: [{ role: 'user', content: 'Hello!' }]\n})\n```\n\n### As Outbound Adapter (Call OpenAI API)\n\n```typescript\nimport { createBridge } from '@amux.ai/llm-bridge'\nimport { anthropicAdapter } from '@amux.ai/adapter-anthropic'\nimport { openaiAdapter } from '@amux.ai/adapter-openai'\n\nconst bridge = createBridge({\n  inbound: anthropicAdapter,\n  outbound: openaiAdapter,\n  config: {\n    apiKey: process.env.OPENAI_API_KEY\n  }\n})\n\n// Send Anthropic format, receive Anthropic format\nconst response = await bridge.chat({\n  model: 'claude-3-5-sonnet-20241022',\n  messages: [{ role: 'user', content: 'Hello!' }]\n})\n```\n\n## Supported Features\n\n- ✅ Chat completions\n- ✅ Streaming\n- ✅ Function/Tool calling\n- ✅ Vision (image inputs)\n- ✅ System prompts\n- ✅ JSON mode\n- ✅ Logprobs\n- ✅ Seed\n\n## API Compatibility\n\nThis adapter supports the OpenAI Chat Completions API format. For detailed API documentation, see [OpenAI API Reference](https://platform.openai.com/docs/api-reference/chat).\n\n## License\n\nMIT © [isboyjc](https://github.com/isboyjc)\n\n## Links\n\n- [Documentation](https://github.com/isboyjc/amux#readme)\n- [GitHub Repository](https://github.com/isboyjc/amux)\n- [Issue Tracker](https://github.com/isboyjc/amux/issues)\n","readmeFilename":"README.md"}