Files
theia-code-os/packages/ai-codex/README.md
mawkone 8bb5110148
Some checks failed
Playwright Tests / Playwright Tests (ubuntu-22.04, Node.js 22.x) (push) Has been cancelled
3PP License Check / 3PP License Check (11, 22.x, ubuntu-22.04) (push) Has been cancelled
Publish packages to NPM / Perform Publishing (push) Has been cancelled
deploy: current vibn theia state
Made-with: Cursor
2026-02-27 12:01:08 -08:00

71 lines
2.1 KiB
Markdown

<div align='center'>
<br />
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
<h2>ECLIPSE THEIA - OPENAI CODEX INTEGRATION</h2>
<hr />
</div>
## Description
The `@theia/ai-codex` integrates OpenAI's Codex agent into the Theia platform, providing natural language coding assistance through the chat interface.
## Features
- Natural language coding assistance via OpenAI Codex SDK
- Thread-based conversation management
- Streaming responses with real-time updates
- Token usage tracking and cost monitoring
- Structured output support (JSON Schema, Zod)
- Integration with Theia's AI chat infrastructure
## Prerequisites
- Node.js 18 or higher
- OpenAI API key (configured via Theia preferences)
## Configuration
### API Key
Codex requires an OpenAI API key. You can configure it in several ways (in order of priority):
1. **Codex-specific key** (highest priority):
- Preference: `ai-features.codex.apiKey`
- Use this if you want a separate API key for Codex
2. **Shared OpenAI key** (fallback):
- Preference: `ai-features.openAiOfficial.openAiApiKey`
- Shared with other OpenAI integrations in Theia
3. **Environment variable** (final fallback):
```bash
export OPENAI_API_KEY=your-api-key-here
```
### Example
If you already use OpenAI features in Theia, Codex will automatically use that API key. No additional configuration needed!
## Additional Information
- [API documentation for `@theia/ai-codex`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_ai-codex.html)
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
- [Theia - Website](https://theia-ide.org/)
- [OpenAI Codex SDK](https://github.com/openai/codex)
## License
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
## Trademark
"Theia" is a trademark of the Eclipse Foundation
<https://www.eclipse.org/theia>