Skip to content

Releases: numman-ali/opencode-openai-codex-auth

v1.0.3 - Clean architecture and improved maintainability

02 Oct 12:58

Choose a tag to compare

🏗️ Code Architecture Improvements

Major Refactoring

  • 50% code reduction in main file (512→256 lines)
  • Modular design with focused, single-responsibility modules
  • Clean separation of concerns across the codebase

New Modules

  • lib/logger.mjs - Centralized debug logging
  • lib/request-transformer.mjs - Request body transformations
  • lib/response-handler.mjs - SSE to JSON conversion

Code Quality

  • Removed all debug console.logs
  • Improved readability and maintainability
  • Easier testing of individual components
  • Better organized imports and dependencies

📝 Documentation Updates

  • Updated project structure in README
  • Added version pinning instructions
  • Improved module overview with new files

🗑️ Cleanup

  • Removed bundled codex-instructions.md (fully migrated to GitHub fetching)

🔧 Technical Details

All functionality remains identical - this is purely a refactoring release for better code organization and future maintainability. No breaking changes.

📦 Installation

```bash
npm install [email protected]
```

Or in your `opencode.json`:
```json
{
"plugin": ["opencode-openai-codex-auth"]
}
```

📊 Package Stats

  • Total files: 10
  • Package size: 12.4 kB
  • Unpacked size: 36.9 kB

v1.0.2 - Smart Caching and Stability Improvements

02 Oct 11:14

Choose a tag to compare

🎯 Major Improvements

Smart ETag-Based Caching

  • Replaced 24-hour TTL cache with HTTP ETag-based conditional requests
  • Only downloads instructions when content actually changes (304 Not Modified responses)
  • Significantly reduces GitHub API calls while staying up-to-date

Release Tag Tracking for Stability

  • Now fetches Codex instructions from latest GitHub release tag instead of main branch
  • Ensures compatibility with ChatGPT Codex API (main branch may have unreleased features)
  • Prevents "Instructions are not valid" errors from bleeding-edge changes

🐛 Bug Fixes

Model Normalization

  • Fixed default model fallback: unsupported models now default to gpt-5 (not gpt-5-codex)
  • Preserves user's choice between gpt-5 and gpt-5-codex when explicitly specified
  • Only codex model variants normalize to gpt-5-codex

Error Prevention

  • Added body.text initialization check to prevent TypeError on body.text.verbosity
  • Improved error handling in request transformation

Code Quality

  • Standardized all console.error prefixes to [openai-codex-plugin]
  • Updated documentation to reflect ETag caching implementation
  • Added npm version and downloads badges to README

📚 Documentation

  • Updated README with accurate caching behavior description
  • Added npm package badges for version tracking
  • Clarified release-based fetching strategy

📦 Installation

npm install [email protected]

Or add to your opencode.json:

{
  "plugin": ["opencode-openai-codex-auth"],
  "model": "openai/gpt-5-codex"
}

Full Changelog: v1.0.1...v1.0.2

v1.0.1 - Documentation Improvements

01 Oct 23:30

Choose a tag to compare

📚 Documentation Update

Improvements

  • ✅ Clarified that npm install is not needed - opencode auto-installs plugins!
  • ✅ Added config file locations (global vs project-specific)
  • ✅ Added links to official opencode docs
  • ✅ Simplified quick start instructions for beginners

Installation

Just add to your opencode.json:

{
  "plugin": ["opencode-openai-codex-auth"],
  "model": "openai/gpt-5-codex"
}

opencode handles the rest automatically!


Full Changelog: v1.0.0...v1.0.1

v1.0.0 - Production Release

01 Oct 23:17

Choose a tag to compare

🎉 Production-ready OpenAI Codex OAuth Plugin

Features

  • ✅ ChatGPT Plus/Pro OAuth authentication with auto-refresh
  • Zero dependencies - Lightweight with only @openauthjs/openauth
  • Auto-updating Codex instructions - Fetches latest from OpenAI's Codex repo (cached 24h)
  • ✅ Full tool support with automatic remapping (apply_patch → edit, update_plan → todowrite)
  • ✅ High reasoning effort with detailed thinking blocks
  • ✅ Modular architecture for easy maintenance

Installation

npm install opencode-openai-codex-auth

Add to your opencode.json:

{
  "plugin": ["opencode-openai-codex-auth"],
  "model": "openai/gpt-5-codex"
}

Authentication

opencode auth login

Select "OpenAI" → "ChatGPT Plus/Pro (Codex Subscription)"

Package Size

  • 13.5 kB compressed
  • 36.7 kB unpacked
  • Only 1 dependency

Credits

Based on research from: