Skip to content

Releases: panando/APIBypass

APIBypass v0.9.1

Choose a tag to compare

@panando panando released this 13 Jul 11:09

APIBypass v0.9.1

Bug Fixes

  • Provider Sidebar Reorder — Fix drag-to-reorder in the config page's provider list landing in wrong positions. The list groups providers by API protocol (Chat Completions / Anthropic / Responses API) into separate sections, each with its own .onMove. SwiftUI gives .onMove offsets relative to that section's filtered subset, but moveProvider treated them as global array offsets — so reordering landed wrong in every group (including the first) whenever the stored order wasn't perfectly clustered by protocol. moveProvider now takes the apiProvider scope and remaps section-local offsets onto the group's fixed global slots (extract group → Array.move → backfill), keeping non-group items in place. Drag is scoped to within-group; cross-group drags clamp to the group boundary.

Technical Changes

  • ConfigDataStore.moveProvider gains an apiProvider: APIProvider parameter and uses the extract-group → Array.move → backfill-slots algorithm (preserves the group's occupied global slots)
  • ConfigManager.moveProvider forwards the apiProvider scope
  • ConfigWindow.swift's three .onMove handlers pass .openai / .anthropic / .responses respectively
  • Add APIBypassTests/ProviderReorderTests.swift with 7 cases covering within-group move (forward/backward/mixed-storage), cross-group clamp, persistence, empty-group no-op, and out-of-range source drop

APIBypass v0.9.0

Choose a tag to compare

@panando panando released this 10 Jul 11:18

New Features

  • ChatGPT.app Support — Adapt to OpenAI's Codex.app → ChatGPT.app rename. The app is now detected, launched, and injected correctly regardless of whether the installed version is named Codex.app or ChatGPT.app.

Bug Fixes

  • CDP Target Matching — Fix injection failure when ChatGPT.app is installed. The previous pickCodexTarget logic only matched pages with "codex" in the title/URL and fell back to the first page, which could inject into the wrong target (DevTools, extension pages). Now uses precise matching: ChatGPT desktop pages are identified by exact title ("ChatGPT") plus URL whitelist (chatgpt.com, chat.openai.com, data:text/html), and the unsafe first-page fallback is removed.

Technical Changes

  • Add ChatGPT.app paths to CodexAppLauncher.defaultCandidates (after legacy Codex.app paths, matching CodexPlusPlus priority order)
  • Add resolveExecutableName(appURL:) to read CFBundleExecutable from Info.plist instead of hardcoding "Codex"
  • Add appNameFromURL(_:) to derive app display name from bundle path
  • Update manualLaunchCommand to accept appName parameter for correct open -a command generation
  • Extract pickCodexTarget as a public function in CodexRouterCore with two-pass matching (codex keyword → ChatGPT desktop → nil)
  • Update localization strings to reference "Codex/ChatGPT" in detection and error messages
  • Add 29 new tests covering ChatGPT detection, executable resolution, and CDP target matching

APIBypass v0.8.9

Choose a tag to compare

@panando panando released this 07 Jul 11:46

Bug Fixes

  • swift_task_dealloc Crash — Fix a crash (swift_task_dealloc with "freed pointer was not the last allocation") that occurred when clicking "Launch Codex" while CodexAdaptorService was running. The crash was caused by Swift Issue #86204 — Task.sleep(for:) cross-module Duration specialization conflict. Replaced all Task.sleep(for:) calls with Task.sleep(nanoseconds:) to work around this Swift compiler bug.

  • Codex Not Restarting After Termination — Fix an issue where Codex would close but fail to restart when clicking "Launch Codex". The previous fixed 800ms wait was unreliable — process exit time varies. Now polls every 200ms to detect when the process has actually exited (with 5-second timeout protection), ensuring reliable restart.

Technical Changes

  • Replace Task.sleep(for:) with Task.sleep(nanoseconds:) in three locations:
    • CodexAppLauncher.swift — terminate wait and debug port polling
    • CodexAdaptorService.swift — CDP state polling
    • CodexAppInjector.swift (CodexRouterCore) — monitor loop

APIBypass v0.8.8

Choose a tag to compare

@panando panando released this 28 Jun 03:56

New Features

  • Protocol Switch Restart Confirmation — When switching communication protocol (Chat Completions ↔ Responses API) while Codex APP is running, show a confirmation dialog informing the user that a restart is required. Unsaved model changes are merged into a single dialog when applicable.

Technical Changes

  • Move config mirror file from ~/.codex/ to ~/Library/Application Support/com.apibypass.APIBypass/ for better separation from Codex APP's directory
  • Add ProtocolSwitchDecisionMaker component with unit tests for protocol switch logic

APIBypass v0.8.7

Choose a tag to compare

@panando panando released this 27 Jun 18:11

v0.8.7

New Features

  • Verbose Logging Toggle - Add a "Verbose" switch in Codex Adaptor's Logs tab. When disabled, only errors are logged and consecutive duplicate events are skipped, reducing log noise.

  • Automatic Parameter Error Retry - When upstream returns a 400 error due to parameter issues (e.g., thinking budget exceeded, signature mismatch), the proxy automatically retries with corrected parameters.

Bug Fixes

  • Model Resolution - Fix model name resolution in Codex Adaptor to prioritize the model (slug) field over displayName when matching catalog entries, improving compatibility with Codex's identifier handling.

Technical Changes

  • Consolidate logging by removing redundant CodexLoggingService, using CodexLogStore as the single logging component with OSLog integration
  • Add ParamErrorRetry utility for parsing upstream error responses and determining retry actions
  • Improve request logging with unique request IDs for better traceability

APIBypass v0.8.6

Choose a tag to compare

@panando panando released this 26 Jun 12:36

v0.8.6

Bug Fixes

  • WireAPI persistence - Fix communication protocol (Chat Completions / Responses API) setting not persisting correctly in Codex adaptor. The selection now persists across app restarts.

  • CancellationError handling - Fix potential crash from not properly propagating CancellationError in async sleep calls.

Technical Changes

  • Add hasLoadedConfig and oldValue != newValue guards in onChange
  • Use DispatchQueue.main.async to clear isHandlingProtocolSwitch flag after state updates
  • Fix error handling in CodexAppLauncher, CodexAdaptorService, and CodexAppInjector

APIBypass v0.8.5

Choose a tag to compare

@panando panando released this 26 Jun 08:57

What's New

Menu Bar Redesign

The menu bar now displays real-time status for each service with intuitive symbols:

  • Status indicators — ● (solid) = running, ○ (hollow) = stopped
  • Launch Codex — New one-click menu item that launches Codex.app with debug port, auto-starting Codex Adaptor service if needed
  • Reorganized structure — Logical grouping: services first, then launch actions, then configuration

Codex Adaptor Improvements

  • CDP connection state tracking — Real-time status indicator showing: disconnected → scanning → connected → injected
  • Model whitelist unlock — New toggle to unlock hidden models in Codex's model selector
  • Statsig model patch — Enables model selector to show all available models
  • Fixed model duplication — Resolved white screen on Codex startup caused by duplicate model entries
  • Enhanced logging — Diagnostic events for CDP injection, plugin patches, and model whitelist operations

Help Documentation

  • New menu bar section — Documents all menu items with status indicator explanations
  • Codex usage guide — Step-by-step instructions for launching and configuring Codex
  • New FAQ entries — Common questions about Codex adaptor, CDP injection, plugin settings
  • Fixed punctuation — Added missing punctuation to Chinese help strings

Documentation Updates

  • Updated screenshots — All screenshots replaced with current UI
  • Launch Codex section — New quickstart section with screenshot
  • Status indicator explanation — Documents ●/○ symbols in README

Bug Fixes

  • Fixed menu bar "Launch Codex" to actually launch Codex.app (previously only started adaptor service)
  • Fixed CDP state polling task lifecycle management
  • Fixed proxy port propagation to injector settings
  • Fixed thinking parameter defaults for Kimi K2.5/K2.6
  • Fixed model config reading with snake_case field names

APIBypass v0.8.4

Choose a tag to compare

@panando panando released this 23 Jun 15:34

What's New

Responses API Support

This release adds support for OpenAI Responses API as a new provider type, alongside the existing OpenAI Chat Completions and Anthropic formats.

  • Add Responses API provider option when creating new providers
  • Add /v1/responses endpoint to the HTTP server
  • Group providers by API type in the provider list for better organization

Protocol-Bound Model Configuration

The Codex adaptor now maintains separate model lists for each protocol type:

  • Chat Completions protocol shows only Chat/Anthropic provider models
  • Responses API protocol shows only Responses API provider models
  • Switching protocols automatically switches to the appropriate model list
  • Unsaved changes are detected and handled before protocol switch

Bug Fixes

  • Fix infinite alert loop when switching protocols with unsaved changes
  • Fix false unsaved changes alert on app launch
  • Fix model catalog not reflecting protocol-specific model lists
  • Fix race conditions during config load by disabling interactions until fully loaded
  • Improve NewProviderView window sizing for Responses API providers

Migration

  • Existing custom models are automatically migrated to the Chat protocol list
  • Configuration is backwards compatible with previous versions

APIBypass v0.8.3

Choose a tag to compare

@panando panando released this 23 Jun 12:17

What's New

Auto-inject max_tokens for Anthropic API

Anthropic API requires the max_tokens field, but OpenAI-format clients (like Codex Adapter) don't always include it. This release auto-injects a default value when converting OpenAI requests to Anthropic format.

  • When FormatTranslator.openAIToAnthropicRequest() converts a request without max_tokens, it now injects a default value of 8192.
  • If the client already provides max_tokens, the value is preserved.
  • Added unit tests covering auto-injection, preservation of existing values, and non-injection for OpenAI format.

Codex Adapter Pipe Deadlock Fix

Fixed a potential deadlock in CodexConfigService when reading Codex template output:

  • Pipe data is now read before waitUntilExit() to avoid blocking when output exceeds the pipe buffer (~64KB).
  • Previously, large outputs could cause the process to hang indefinitely.

APIBypass v0.8.1

Choose a tag to compare

@panando panando released this 22 Jun 15:42

What's New

Claude Code Launcher Compatibility Fix

The launcher now finds the claude binary regardless of which official installation method was used. Previously, it failed on machines using Homebrew Cask, fnm, or Volta installs, and could not find Claude Code at all on some systems.

Supported install methods:

Install Method Path
Native (curl | bash) ~/.local/bin/claude
Auto-updater / Desktop app ~/.claude/bin/claude
Homebrew (Apple Silicon) /opt/homebrew/bin/claude
Homebrew (Intel) /usr/local/bin/claude
Homebrew Cask Claude.app/Contents/MacOS/claude
npm + nvm ~/.nvm/versions/node/v*/bin/claude
npm + fnm ~/Library/Application Support/fnm/.../installation/bin/claude
npm + Volta ~/.volta/bin/claude
Any other Login-shell zsh -l -c "which claude" fallback

Key fixes:

  • Replaced /usr/bin/which (doesn't inherit user PATH) with login-shell which to pick up nvm/fnm/volta paths
  • Removed hardcoded nvm Node version paths; now dynamically scans all installed versions
  • Added ~/.claude/bin/claude, Homebrew Cask, fnm, and Volta search paths
  • Added FileSystem protocol for testability with 11 unit tests

Full Changelog: v0.8.0...v0.8.1