Skip to content

feat(adapters): parse OpenAI-compatible prompts - #14

Merged
kev1n77 merged 1 commit into
mainfrom
codex/openai-adapter-registry
Jul 15, 2026
Merged

kev1n77 merged 1 commit into
mainfrom
codex/openai-adapter-registry

Conversation

@kev1n77

@kev1n77 kev1n77 commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an adapter registry with confidence ordering, invalid-confidence rejection, adapter error/panic isolation, Prompt IR validation, structured partial issues, and Raw fallback
  • add an OpenAI-compatible adapter for Responses, Chat Completions, and Completions requests
  • map system/developer/user/assistant/tool messages, multimodal parts, function definitions, tool calls/results, generation options, and streaming request flags with JSON-pointer evidence
  • replace the desktop demo's handwritten Prompt IR fixture with the real Capture Policy -> adapter -> Prompt IR -> SQLCipher path
  • update capture documentation and mark PAR-002/003 complete

Contract evidence

  • checked capture/golden pairs cover Responses and Chat streaming requests with tools and multimodal content
  • completions arrays remain distinct user messages
  • tool use IDs match subsequent tool result references
  • unknown content is preserved as PromptPart::Unknown with a partial issue
  • invalid JSON and unsupported providers fall back to Raw
  • rejecting, panicking, and invalid-output adapters do not prevent a lower-confidence valid candidate from succeeding

Verification

  • cargo fmt --all -- --check
  • cargo test --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --manifest-path apps/desktop/src-tauri/Cargo.toml -- --check
  • cargo test --manifest-path apps/desktop/src-tauri/Cargo.toml
  • cargo clippy --manifest-path apps/desktop/src-tauri/Cargo.toml --all-targets -- -D warnings
  • npm run desktop:check
  • npm run desktop:build

@kev1n77
kev1n77 merged commit 3c10d1a into main Jul 15, 2026
9 checks passed
@kev1n77
kev1n77 deleted the codex/openai-adapter-registry branch July 15, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant