Skip to content

feat: add Codex provider support - #79

Open
haroldxie2308 wants to merge 2 commits into
Pickle-Pixel:mainfrom
haroldxie2308:add-codex-provider-support
Open

feat: add Codex provider support#79
haroldxie2308 wants to merge 2 commits into
Pickle-Pixel:mainfrom
haroldxie2308:add-codex-provider-support

Conversation

@haroldxie2308

Copy link
Copy Markdown

Adds Codex as an LLM provider option for ApplyPilot and updates the changelog per contribution guidelines.\n\nCloses #32.

Copilot AI review requested due to automatic review settings July 13, 2026 08:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread src/applypilot/config.py
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 thread src/applypilot/config.py
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}"'
)
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.

2 participants