refactor/ migrate from OpenAI to OpenRouter integration

Major improvements to AI integration and developer experience:

## OpenRouter Migration
- Replaced @ai-sdk/openai with @openrouter/ai-sdk-provider
- Updated chat API route to use OpenRouter for access to 100+ AI models
- Changed environment variables from OPENAI_* to OPENROUTER_*
- Updated default model from gpt-5-mini to openai/gpt-5-mini
- Benefits: Users can now access multiple AI providers (OpenAI, Anthropic, etc.) through a single unified API

## Documentation Overhaul
- Expanded CLAUDE.md from 3 lines to comprehensive 225-line guide
- Added complete project structure, tech stack overview, and AI integration guidelines
- Documented all environment variables, scripts, and common tasks
- Added critical rules for AI assistants working with the codebase
- Enhanced checkpoint command with detailed step-by-step instructions

## README Updates
- Updated feature list to highlight OpenRouter integration
- Revised setup instructions for OpenRouter API key acquisition
- Updated environment variable examples and deployment configuration
- Changed all OpenAI references to OpenRouter throughout documentation

## Create Command Updates
- Bumped create-agentic-app version from 1.0.0 to 1.0.1
- Synchronized all template files with main project documentation
- Updated template env.example and package.json with OpenRouter configuration

## Dependency Updates
- Added @openrouter/ai-sdk-provider@^1.2.0
- Updated @ai-sdk/openai from ^2.0.53 to ^2.0.60
- Updated @ai-sdk/react from ^2.0.78 to ^2.0.86
- Updated ai from ^5.0.78 to ^5.0.86
- Updated better-auth from ^1.3.29 to ^1.3.34
- Updated drizzle-kit from ^0.31.5 to ^0.31.6
- Updated eslint from ^9.38.0 to ^9.39.0
- Various type definition updates

Breaking Changes:
- Projects must update environment variables from OPENAI_* to OPENROUTER_*
- API keys must be obtained from openrouter.ai instead of platform.openai.com
- Model names now follow OpenRouter format (e.g., "openai/gpt-5-mini")

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Leon van Zyl
2025-11-03 14:49:40 +02:00
parent 9ca00bec8f
commit 61e98f23cf
13 changed files with 878 additions and 377 deletions

View File

@@ -1,2 +1,32 @@
Please commit all changes and provide a suitable comment for the commit.
Run git init if git has not been instantiated for the project as yet.
Please create a comprehensive checkpoint commit with the following steps:
1. **Initialize Git if needed**: Run `git init` if git has not been instantiated for the project yet.
2. **Analyze all changes**:
- Run `git status` to see all tracked and untracked files
- Run `git diff` to see detailed changes in tracked files
- Run `git log -5 --oneline` to understand the commit message style of this repository
3. **Stage everything**:
- Add ALL tracked changes (modified and deleted files)
- Add ALL untracked files (new files)
- Use `git add -A` or `git add .` to stage everything
4. **Create a detailed commit message**:
- **First line**: Write a clear, concise summary (50-72 chars) describing the primary change
- Use imperative mood (e.g., "Add feature" not "Added feature")
- Examples: "feat: add user authentication", "fix: resolve database connection issue", "refactor: improve API route structure"
- **Body**: Provide a detailed description including:
- What changes were made (list of key modifications)
- Why these changes were made (purpose/motivation)
- Any important technical details or decisions
- Breaking changes or migration notes if applicable
- **Footer**: Include co-author attribution as shown in the Git Safety Protocol
5. **Execute the commit**: Create the commit with the properly formatted message following this repository's conventions.
IMPORTANT:
- Do NOT skip any files - include everything
- Make the commit message descriptive enough that someone reviewing the git log can understand what was accomplished
- Follow the project's existing commit message conventions (check git log first)
- Include the Claude Code co-author attribution in the commit message