atxtechbro / atxtechbro/dotfiles

Make AI PR Generator modular to support multiple AI models (Claude, Codex)

Open
#230 1 comment 0 reactions 0 assignees View on GitHub
ai enhancement modularity
Dominant language
Shell
Stars
27
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Description

Currently, the AI PR Generator (PR #229) is designed specifically for Claude Code. We should make it modular to support multiple AI models, including Codex, allowing users to choose which AI model to use based on their preferences or available API keys.

## Current Behavior

- The PR generator is tightly coupled to Claude Code
- Only supports Claude's API and authentication methods
- Configuration is specific to Claude's command-line parameters

## Expected Behavior

- Support multiple AI models through a modular architecture
- Allow selection of AI model via workflow input parameter or label prefix
- Handle different authentication methods for each supported model
- Maintain consistent PR generation workflow regardless of the AI model used

## Implementation Details

### Proposed Architecture

1. **Model Abstraction Layer**:
- Create a common interface for AI model interactions
- Implement model-specific adapters (Claude, Codex, etc.)

2. **Configuration Management**:
- Support model-specific configuration and secrets
- Allow different prompt formats optimized for each model

3. **Model Selection**:
- Add a parameter to select the model: `ai-model: [claude|codex]`
- Support label-based selection (e.g., `claude-generate`, `codex-generate`)

### Example Workflow Input

```yaml
workflow_dispatch:
inputs:
issue_number:
description: 'Issue number to process'
required: true
type: number
ai_model:
description: 'AI model to use'
required: true
default: 'claude'
type: choice
options:
- claude
- codex
```

### Required Secrets

- `ANTHROPIC_API_KEY` - For Claude
- `OPENAI_API_KEY` - For Codex/OpenAI models
- Additional keys as needed for other models

## References

- Current implementation in PR #229: https://github.com/atxtechbro/dotfiles/pull/229
- Claude Code documentation: https://docs.anthropic.com/claude/docs/claude-code-sdk
- OpenAI Codex documentation: https://platform.openai.com/docs/guides/code

## Related Issues

- #228 - Original issue for Claude Code PR Generator

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the current implementation in PR #229 and the context from issue #228. Trace how the workflow dispatch input, Claude-specific parameters, authentication, and PR generation are connected. Done means the workflow can select Claude or Codex, use the corresponding secret and prompt configuration, and preserve the same PR-generation flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, shell
Domain
ai, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.