Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
984996a
docs: enhance CLAUDE.md with comprehensive architecture guide
semikolon Aug 12, 2025
b096e44
feat: implement environment variable resolution in ProviderService
semikolon Aug 19, 2025
f53092c
gitignore: add .claude/settings.local.json
semikolon Aug 19, 2025
543b467
fix: correct gitignore format for .claude/settings.local.json
semikolon Aug 19, 2025
0c7a2d9
feat: add basic OpenAI transformer for tool format conversion
semikolon Aug 19, 2025
a1e5426
fix: add name property to OpenAI transformer
semikolon Aug 19, 2025
0ad5ca9
feat: complete GPT-5 support with working tool format conversion
semikolon Aug 19, 2025
9dbb590
Merge remote-tracking branch 'upstream/main'
semikolon Aug 19, 2025
4b15fd2
docs: add comprehensive GPT-5 support documentation
semikolon Aug 19, 2025
51eb3c7
feat: enhance reasoning transformer for GPT-5 non-streaming responses
semikolon Aug 19, 2025
6cf740b
feat: enhance reasoning transformer documentation and clean debug output
semikolon Aug 22, 2025
89a3a63
docs: add comprehensive GPT-5 API quirks and compatibility fixes
semikolon Aug 22, 2025
8d6f9fc
docs: modernize GPT-5 comparisons for 2025 model landscape
semikolon Aug 22, 2025
9191eab
cleanup: remove debug file logging from OpenAI transformer
semikolon Aug 22, 2025
51fd5f9
docs: add PR strategy for GitHub publication
semikolon Aug 22, 2025
2b5295e
chore: save current development work before PR creation
semikolon Aug 22, 2025
defcf67
docs: add dev-workflow.sh script documentation to development workflow
semikolon Aug 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ node_modules
.env
config.json
.idea
.cursor
.cursor
.claude/settings.local.json
Binary file not shown.
25 changes: 25 additions & 0 deletions .serena/memories/code_style_conventions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Code Style & Conventions

## TypeScript Standards
- **Strict TypeScript mode** with 2-space indentation
- **Target**: Node.js 18+ with ES2022 features
- **Import Style**: Prefer `@/` alias for imports (maps to `src` directory)
- **Type Definitions**: Strong typing with interface implementations

## File Organization
- **Transformers**: Located in `src/transformer/` directory
- **Services**: Core business logic in `src/services/`
- **Types**: Shared type definitions in `src/types/`
- **Utils**: Helper functions in `src/utils/`

## Naming Conventions
- **Classes**: PascalCase (e.g., `ReasoningTransformer`, `OpenAITransformer`)
- **Files**: kebab-case (e.g., `reasoning.transformer.ts`)
- **Methods**: camelCase (e.g., `transformRequestOut`, `transformResponseIn`)
- **Constants**: UPPER_SNAKE_CASE (e.g., `TransformerName`)

## Architecture Patterns
- **Transformer Pattern**: Implement `Transformer` interface with optional methods
- **Service Layer**: Clear separation between config, provider, LLM, and transformer services
- **Error Handling**: Comprehensive try-catch with fallback responses
- **Logging**: Debug logs to temporary files for complex transformations
24 changes: 24 additions & 0 deletions .serena/memories/project_overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Project Overview

## Purpose
Universal LLM API transformation server (@musistudio/llms v1.0.26) - middleware to standardize requests/responses between different LLM providers (Anthropic, Gemini, Deepseek, OpenAI, etc.) using modular transformer system.

## Tech Stack
- **Language**: TypeScript with Node.js 18+ (ES2022 features)
- **Build System**: esbuild with dual CJS/ESM output
- **Server Framework**: Fastify with CORS support
- **Development**: nodemon + tsx for hot-reloading
- **Package Manager**: npm/pnpm supported

## Architecture
1. **Transformers**: Provider-specific request/response conversion classes
2. **Unified Formats**: UnifiedChatRequest and UnifiedChatResponse types
3. **Streaming Support**: Real-time streaming response handling
4. **Service Layer**: ConfigService, LLMService, ProviderService, TransformerService

## Key Features
- 16+ transformers for various LLM providers and utilities
- Path aliases (`@` maps to `src` directory)
- Dual format builds (CommonJS and ESM)
- Environment configuration via .env or config.json
- Complete GPT-5 support with reasoning token handling
29 changes: 29 additions & 0 deletions .serena/memories/suggested_commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Suggested Commands

## Development Commands
- **Install dependencies**: `pnpm install` or `npm install`
- **Development mode**: `npm run dev` (Uses nodemon + tsx for hot-reloading)
- **Build**: `npm run build` (Outputs to dist/cjs and dist/esm)
- **Build with watch**: `npm run build:watch` (Continuous build during development)
- **Lint**: `npm run lint` (Runs ESLint on src directory)
- **Start server (CJS)**: `npm start` or `node dist/cjs/server.cjs`
- **Start server (ESM)**: `npm run start:esm` or `node dist/esm/server.mjs`

## Local Development with yalc (Recommended)
```bash
# Publish to yalc registry
yalc publish

# In consuming project (ccr-dev)
yalc add @musistudio/llms
npm run build

# Push updates after changes
yalc push # Automatically updates all linked projects
```

## macOS System Commands
- **File operations**: `ls`, `find`, `grep` (standard Unix commands)
- **Process management**: `ps aux | grep <process>`, `kill <PID>`
- **Directory navigation**: `cd`, `pwd`
- **Package management**: `npm cache clean --force` (if needed)
28 changes: 28 additions & 0 deletions .serena/memories/task_completion_procedures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Task Completion Procedures

## Before Committing Code
1. **Linting**: Run `npm run lint` to check TypeScript compliance
2. **Build**: Run `npm run build` to ensure compilation succeeds
3. **Testing**: Manual testing via development server (`npm run dev`)
4. **Local Package Testing**: Use yalc workflow for integration testing

## Local Development with yalc (Preferred)
```bash
# In llms-dev project
yalc publish # Publish changes to yalc registry
yalc push # Push updates to linked projects

# In consuming project (ccr-dev)
yalc add @musistudio/llms # Link the package
npm run build # Rebuild consumer
```

## Deployment Commands
- **Development**: `npm run dev` (nodemon + tsx hot-reloading)
- **Production Build**: `npm run build` (creates dist/cjs and dist/esm)
- **Start Production**: `npm start` (CJS) or `npm run start:esm` (ESM)

## Documentation Standards
- Update CLAUDE.md for major architectural changes
- Follow conventional commit messages (feat:, fix:, docs:, etc.)
- Document transformer additions in the main export index
Loading