aider-gitea/aider_gitea/secrets.py
Jon Michael Aanes 325c0767f1
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 26s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 23s
Add Claude Code integration with automatic model routing
Implemented complete Claude Code support alongside existing Aider integration:
- ClaudeCodeSolver strategy with programmatic Claude Code CLI usage
- Intelligent model detection to route Anthropic models to Claude Code
- Shared post-solver cleanup function to eliminate code duplication
- CLAUDE_CODE_MESSAGE_FORMAT constant for maintainable prompts
- Comprehensive test suite with 18 passing tests
- Automatic ANTHROPIC_API_KEY environment setup

Users can now specify any Anthropic model (claude, sonnet, haiku, opus) to use Claude Code, while other models continue using Aider.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-09 01:18:11 +02:00

16 lines
325 B
Python

import secret_loader
SECRETS = secret_loader.SecretLoader()
def llm_api_keys() -> list[str]:
return SECRETS.load_or_fail('LLM_API_KEY').strip().split('\n')
def gitea_token() -> str:
return SECRETS.load_or_fail('GITEA_TOKEN')
def anthropic_api_key() -> str:
return SECRETS.load_or_fail('ANTHROPIC_API_KEY')