Skip to content

Conversation

@okturan
Copy link
Owner

@okturan okturan commented Nov 4, 2025

No description provided.

- Add TEXTAREA_CONFIG for textarea auto-resize parameters
- Add EXPORT_FORMAT for JSON export configuration
- Add PRICING_MULTIPLIERS for model pricing calculations
- Add TOAST_CONFIG for toast notification settings
- Update TranslationEditor to use TEXTAREA_CONFIG
- Update FileManager to use EXPORT_FORMAT
- Update ModelSelector to use PRICING_MULTIPLIERS
- Update App to use TOAST_CONFIG

This improves maintainability by centralizing configuration values
and makes it easier to adjust settings in the future.
- Add pathUtils for parsing variation paths (type:key format)
- Add modelUtils for extracting and formatting provider names
- Update FileManager to use parsePathPart utility
- Update variationUtils to use parsePathPart utility
- Update ModelSelector to use extractProviderFromModelId and capitalizeProvider

This reduces code duplication and makes path parsing logic reusable
across the codebase. The pattern "type:key" splitting now has a single
source of truth.
- Create pricingUtils with formatModelPricing function
- Remove 54 lines of duplicate pricing logic from ModelSelector
- Support both detailed and compact pricing formats
- Improve maintainability by centralizing pricing calculations

This eliminates the exact same pricing calculation that appeared
twice in ModelSelector (lines 97-111 and 138-151).
- Create config/env.ts with environment configuration
- Add API_ENDPOINTS for CHAT_COMPLETIONS and MODELS
- Update translationService to use API_ENDPOINTS
- Update modelService to use API_ENDPOINTS
- Support VITE_OPENROUTER_API_URL environment variable

This makes it easy to:
- Switch between environments (dev/staging/prod)
- Mock API endpoints for testing
- Configure self-hosted OpenRouter instances
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants