Skip to content

Commit afbbf0b

Browse files
numman-aliclaude
andcommitted
chore: bump version to 4.0.1
- Fix orphaned function_call_output errors during summary/compaction - Add GitHub API rate limit fallback for Codex instructions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 86417fe commit afbbf0b

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
All notable changes to this project are documented here. Dates use the ISO format (YYYY-MM-DD).
44

5+
## [4.0.1] - 2025-11-27
6+
7+
**Bugfix release**: Fixes API errors during summary/compaction and GitHub rate limiting.
8+
9+
### Fixed
10+
- **Orphaned `function_call_output` errors**: Fixed 400 errors during summary/compaction requests when OpenCode sends `item_reference` pointers to server-stored function calls. The plugin now filters out `function_call` and `function_call_output` items when no tools are present in the request.
11+
- **GitHub API rate limiting**: Added fallback mechanism when fetching Codex instructions from GitHub. If the API returns 403 (rate limit), the plugin now falls back to parsing the HTML releases page.
12+
13+
### Technical Details
14+
- Root cause: OpenCode's secondary model (gpt-5-nano) uses `item_reference` with `fc_*` IDs to reference stored function calls. Our plugin filters `item_reference` for stateless mode (`store: false`), leaving `function_call_output` orphaned. The Codex API rejects requests with orphaned outputs.
15+
- Fix: When `hasTools === false`, filter out all `function_call` and `function_call_output` items from the input array.
16+
- GitHub fallback chain: API endpoint → HTML page → redirect URL parsing → HTML regex parsing.
17+
518
## [4.0.0] - 2025-11-25
619

720
**Major release**: Complete prompt engineering overhaul matching official Codex CLI behavior, with full **GPT-5.1 Codex Max** support.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Follow me on [X @nummanthinks](https://x.com/nummanthinks) for future updates an
6060
#### Recommended: Pin the Version
6161

6262
```json
63-
"plugin": ["[email protected].0"]
63+
"plugin": ["[email protected].1"]
6464
```
6565

6666
**Why pin versions?** OpenCode uses Bun's lockfile which pins resolved versions. If you use `"opencode-openai-codex-auth"` without a version, it resolves to "latest" once and **never updates** even when new versions are published.
@@ -74,7 +74,7 @@ Simply change the version in your config and restart OpenCode:
7474
"plugin": ["[email protected]"]
7575

7676
// To:
77-
"plugin": ["[email protected].0"]
77+
"plugin": ["[email protected].1"]
7878
```
7979

8080
OpenCode will detect the version mismatch and install the new version automatically.
@@ -108,7 +108,7 @@ Check [releases](https://github.com/numman-ali/opencode-openai-codex-auth/releas
108108
{
109109
"$schema": "https://opencode.ai/config.json",
110110
"plugin": [
111-
111+
112112
],
113113
"provider": {
114114
"openai": {
@@ -517,7 +517,7 @@ Apply settings to all models:
517517
```json
518518
{
519519
"$schema": "https://opencode.ai/config.json",
520-
"plugin": ["[email protected].0"],
520+
"plugin": ["[email protected].1"],
521521
"model": "openai/gpt-5-codex",
522522
"provider": {
523523
"openai": {
@@ -537,7 +537,7 @@ Create your own named variants in the model selector:
537537
```json
538538
{
539539
"$schema": "https://opencode.ai/config.json",
540-
"plugin": ["[email protected].0"],
540+
"plugin": ["[email protected].1"],
541541
"provider": {
542542
"openai": {
543543
"models": {

config/full-opencode.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
33
"plugin": [
4-
4+
55
],
66
"provider": {
77
"openai": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opencode-openai-codex-auth",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "OpenAI ChatGPT (Codex backend) OAuth auth plugin for opencode - use your ChatGPT Plus/Pro subscription instead of API credits",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)