All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
AUTH_TOKENis now optional again — when not configured, authentication is skipped and all requests are allowed (reverts 2.1.0 behavior)
- Timing-safe token comparison for
AUTH_TOKENauthentication Content-Type: application/jsonvalidation on POST endpoints (returns 415)- Message role allowlist validation (
user,assistant,system) - Message content length cap (32 KB per message)
- Model ID format validation via regex pattern
- In-flight promise deduplication for Firebase token and model list fetches (prevents cache stampede)
- SSE parser now concatenates multiple
data:lines per SSE spec - Error cause chaining in Firebase token fetch (distinguishes timeout vs network errors)
- Fetch error logging in Merlin API client
AUTH_TOKENis now required — returns 503 if not configured (previously optional)- Model
owned_byfield now reflects actual provider (google, deepseek-ai, etc.) instead of hardcodedopenai - Sanitized user-supplied model names in error responses to prevent log pollution
- Streaming IIFE handlers now catch unhandled rejections
writer.close()wrapped in try/catch to handle already-errored writers- Firebase token TTL uses named constant
FIREBASE_TOKEN_LIFETIME_MSinstead of magic number - Removed misleading
|| ''fallback inGOOGLE_API_KEYcheck
- Replaced
===token comparison with XOR-based timing-safe equality - Added input validation at system boundary (role, content length, model ID format)
- Locked down unauthenticated access by default
- Anthropic-compatible
/v1/messagesendpoint (streaming and non-streaming) - Dynamic model list fetched from Merlin CDN with 3-tier cache (in-memory → CF Cache API → CDN)
- Biome linter and formatter
x-api-keyheader support for authentication- Dedicated modules:
anthropic.ts,merlin.ts,models.ts
- Replaced hardcoded
ALLOWED_MODELSwith dynamic model fetching - Refactored SSE parsing and Merlin API client into separate module
- Version bumped to 2.0.0
- Implemented
/v1/modelsendpoint following OpenAI API standard format - Models list endpoint returns proper OpenAI-compatible model objects
- Updated version from 1.2.0 to 1.3.0
- Removed unnecessary message field from root endpoint
- Root endpoint (
/) now displays version number and supported models - Version information in API response
- Updated version from 1.1.0 to 1.2.0
- Model list update: replaced
llama-4-maverickwithgpt-5-nano
- Prepared for Docker containerization support
- Enhanced documentation for potential Docker deployment
- Updated version from 1.0.0 to 1.1.0
- OpenAI-compatible
/v1/chat/completionsAPI endpoint - Support for streaming and non-streaming responses
- Automatic Firebase authentication integration
- Global edge deployment on Cloudflare Workers
- CORS support for cross-origin requests
- Support for 4 AI models:
- gpt-4o-mini
- llama-4-maverick
- gemini-2.5-flash
- deepseek-chat
- Token caching for improved performance
- Optional authentication token support
- Comprehensive error handling