feat: add Codex provider support - #79
Open
haroldxie2308 wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Codex as a first-class option for both (1) LLM-backed scoring/tailoring/cover letters and (2) auto-apply agent execution, plus expands resume handling to support LaTeX sources.
Changes:
- Add Codex provider integration via a Codex CLI-backed LLM client and related configuration/tier gating.
- Add Codex as an auto-apply agent backend (CLI selection, command building, log parsing).
- Add LaTeX resume ingestion/extraction/optional PDF compilation and wire it into scoring/tailoring/cover-letter/PDF flows.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/applypilot/wizard/init.py | Wizard updates: provider selection includes Codex; resume step supports .tex ingestion; auto-apply step allows Codex agent. |
| src/applypilot/scoring/tailor.py | Loads resume text via shared helper (supports .tex fallback) and trims unused validator imports. |
| src/applypilot/scoring/scorer.py | Loads resume text via shared helper (supports .tex fallback). |
| src/applypilot/scoring/pdf.py | Supports compiling .tex directly to PDF; batch conversion prefers .tex when present. |
| src/applypilot/scoring/cover_letter.py | Loads resume text via shared helper; streamlines DB imports. |
| src/applypilot/resume.py | New resume ingestion module: LaTeX text extraction + optional LaTeX→PDF compilation. |
| src/applypilot/llm.py | Adds LLM_PROVIDER=codex detection and a Codex CLI-backed LLM client implementation. |
| src/applypilot/config.py | Adds LLM provider/agent backend helpers, Codex login status checks, and updates tier gating logic. |
| src/applypilot/cli.py | apply command now selects an agent backend; doctor reports Codex/LaTeX-aware setup status. |
| src/applypilot/apply/prompt.py | Generalizes prompt docstring away from Claude-specific wording; removes unused variable. |
| src/applypilot/apply/launcher.py | Adds agent backend command building for Codex, and supports agent selection throughout apply pipeline. |
| src/applypilot/agent.py | New module for resolving agent backend + building Codex Playwright MCP override args. |
| CHANGELOG.md | Notes Codex provider support under Unreleased. |
| .env.example | Documents LLM_PROVIDER and Codex login requirement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+273
to
+279
| provider = get_llm_provider() | ||
| if provider == "codex": | ||
| has_llm, _ = codex_login_status() | ||
| elif provider in ("gemini", "openai", "local"): | ||
| has_llm = True | ||
| else: | ||
| has_llm = False |
Comment on lines
+323
to
+330
| if required >= 2: | ||
| provider = get_llm_provider() | ||
| if provider == "codex": | ||
| logged_in, detail = codex_login_status() | ||
| if not logged_in: | ||
| missing.append(f"Codex login — run [bold]codex login[/bold] ({detail})") | ||
| elif provider not in ("gemini", "openai", "local"): | ||
| missing.append("LLM provider — run [bold]applypilot init[/bold] to configure Gemini, OpenAI, local, or Codex") |
Comment on lines
+317
to
+320
| console.print(f"[yellow]Codex is not logged in yet.[/yellow] {detail}") | ||
| if Confirm.ask("Run `codex login` now?", default=True): | ||
| subprocess.run(["codex", "login"], check=False) | ||
| ok, detail = _check_codex_login() |
Comment on lines
+313
to
+320
| if backend.name == "codex": | ||
| return ( | ||
| f"codex exec --model {backend.model} --dangerously-bypass-approvals-and-sandbox " | ||
| f'--cd "{config.APP_DIR}" --skip-git-repo-check ' | ||
| f"{' '.join(_make_codex_overrides(port))} " | ||
| f'--output-last-message "{prompt_file.with_suffix(".last-message.txt")}" ' | ||
| f'< "{prompt_file}"' | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Codex as an LLM provider option for ApplyPilot and updates the changelog per contribution guidelines.\n\nCloses #32.