Commit Graph

75 Commits

Author SHA1 Message Date
musistudio
8c4fec4f5f fix stream handler error 2025-09-02 21:23:21 +08:00
musistudio
5d53571fe6 release v1.0.45 2025-09-02 19:55:04 +08:00
musistudio
c7303775ad update document 2025-09-02 12:13:54 +08:00
musistudio
19522f496b add agents to support route image 2025-09-01 17:19:43 +08:00
musistudio
6ab608943e release v1.0.43 2025-08-20 12:43:57 +08:00
musistudio
915495553a fix some bugs 2025-08-19 22:33:59 +08:00
musistudio
6b7d0926c4 fix windows error 2025-08-18 22:29:24 +08:00
musistudio
21ab7c61ce feat: override settingsFlag 2025-08-18 22:10:27 +08:00
Nico Thomaier
ac0263b226 fix(utils): use || instead of ?? for CLAUDE_PATH
The previous null‑ish coalescing treated empty strings as a valid value, which could result in an invalid path. Switching to logical OR keeps the precedence (config > env) but now falls back to the default `claude`
2025-08-17 17:46:03 +02:00
Nico Thomaier
6a4c1f7591 fix(utils): update codeCommand to improve command handling
- use CLAUDE_PATH in Config file if it is not empty.
2025-08-17 17:30:56 +02:00
musistudio
95b2dadd40 feat: optimize ui 2025-08-17 18:02:09 +08:00
musistudio
d6b11e1b60 feat: statusline support script 2025-08-17 00:25:22 +08:00
musistudio
19d0f3b8f5 release v1.0.39 2025-08-16 15:17:06 +08:00
musistudio
e078127ac6 release v1.0.38 2025-08-15 23:54:41 +08:00
musistudio
0e509528c2 add ccr statusline command 2025-08-15 23:50:57 +08:00
BigUncle
b8f52ba538 feat logging: Implement LOG_LEVEL configuration option and improve logging consistency
- Add LOG_LEVEL configuration option to control logging verbosity
- Update UI to include LOG_LEVEL dropdown in settings
- Fix logging inconsistency between environment variables and config file
- Unify logging configuration to use config file settings
- Maintain separate logging systems for different purposes:
  * Server-level logs (HTTP requests, API calls) using pino in ~/.claude-code-router/logs/
  * Application-level logs (routing decisions, business logic) in ~/.claude-code-router/claude-code-router.log
- Update documentation with accurate logging system information
- Add detailed information about dual logging systems in README.md and README_zh.md
- Improve type safety and validation in ConfigProvider

Co-authored-by: qwen-cli <https://github.com/QwenLM/qwen-code>
2025-08-14 21:17:27 +08:00
musistudio
bc08c4ab48 add update button 2025-08-13 21:32:57 +08:00
musistudio
d9b7667c93 Merge remote-tracking branch 'origin/main' 2025-08-12 22:47:13 +08:00
musistudio
cce1625534 fix windows/linux get system uuid error 2025-08-12 21:41:42 +08:00
Fredrik Bränström
3ad140d2f5 feat: add environment variable interpolation for API keys
- Add interpolateEnvVars function to support $VAR_NAME and ${VAR_NAME} syntax
- Apply interpolation to config after JSON5 parsing in readConfigFile()
- Enables secure API key management without hardcoding in config.json
- Supports nested objects and arrays for comprehensive interpolation
- Maintains backward compatibility with existing configurations

Example usage in config.json:
{
  "OPENAI_API_KEY": "$OPENAI_API_KEY",
  "Providers": [
    {
      "name": "openai",
      "api_key": "$OPENAI_API_KEY"
    }
  ]
}
2025-08-11 21:43:32 +02:00
musistudio
075ec76ec1 fix windows logs path error 2025-08-11 10:25:50 +08:00
musistudio
709b49b0e8 release v1.0.35 to fix windows logfile name 2025-08-10 22:11:51 +08:00
musistudio
b856e1e11b relese v1.0.34 to optimize the log 2025-08-10 21:37:48 +08:00
BigUncle
1708c59434 fix ui: resolve 403 Forbidden error when restarting service via UI
- Include /api/restart endpoint in access control checks alongside /api/config endpoints
- Ensure restart endpoint properly validates API key authentication
- This fixes the issue where 'Save and Restart' fails with 403 error in UI
2025-08-09 20:44:28 +08:00
musistudio
9cd5587f52 feat: Implement temporary API key based on system UUID for UI access
This commit introduces a new authentication mechanism for the web UI.
Instead of requiring a pre-configured API key, a temporary API key is
generated based on the system's UUID. This key is passed to the UI
as a URL parameter and used for API requests.

Changes:
- Added a new utility to get the system UUID and generate a temporary API key.
- Modified the `ccr ui` command to generate and pass the temporary API key.
- Updated the authentication middleware to validate the temporary API key.
- Adjusted the frontend to use the temporary API key from the URL.
- Added a dedicated endpoint to test API access without modifying data.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-07 15:00:42 +08:00
musistudio
3e1963564a fix ui: add form validator 2025-08-06 21:11:44 +08:00
musistudio
023c045821 Merge remote-tracking branch 'origin/main' 2025-08-06 20:54:21 +08:00
musi
a958f18305 Merge branch 'main' into bugfix/fix-code-args-handling 2025-08-06 20:53:24 +08:00
小光
37cb0c776f fix ui: 修复Docker中运行通过UI重启报错的问题
使用Claude Code修复
2025-08-06 15:03:06 +08:00
Stefan Schoeffmann
91e9d43abd Preserve spaces in quoted args
This makes SDK mode work since the model gets the complete quoted prompt passed in (instead of just the first word)
2025-08-05 21:34:19 +02:00
musistudio
216ee939fb feat ui: add placeholder for proxy_url 2025-08-05 22:21:13 +08:00
Yashvardhan Jagnani
355c83a8c1 feat: non interactive spawn compatible 2025-08-05 13:42:38 +05:30
FlintyLemming
d684319261 feat: support setting ANTHROPIC_SMALL_FAST_MODEL from config file 2025-08-04 15:03:22 +08:00
musistudio
e51d70caf2 feat ui: add tooltip 2025-08-04 09:48:15 +08:00
musistudio
99afe0e21a compatible model name case problem 2025-08-03 07:47:11 +08:00
musistudio
7751683365 pass token count to custom router 2025-08-03 07:38:51 +08:00
musistudio
c2edcd145e add supoort subagent router via <CCR-SUBAGENT-MODEL> 2025-08-03 07:31:17 +08:00
musistudio
3cb086fc57 feat: Limit config backups to 3 most recent files
Modified the backupConfigFile function to automatically clean up old backups,
keeping only the 3 most recent backup files. This prevents the config directory
from accumulating excessive backup files over time.

The implementation:
- Creates timestamped backups as before
- After each new backup, scans for existing backups
- Sorts backups by timestamp (newest first)
- Deletes all but the 3 most recent backups
- Gracefully handles cleanup errors with warnings

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 21:59:10 +08:00
musistudio
1d7374067e fix: improve error handling and config validation
- Add fallback mechanism for service startup with default config
- Implement config file backup before saving
- Add robust validation for config data in UI components
- Improve error handling and user feedback in UI
- Fix potential null/undefined access in provider and router components

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 15:39:44 +08:00
musistudio
e560db85f4 fix: show default port 3456 in status when not specified in config
When the PORT was not specified in the config file, the status command
would show "undefined" for the port. This fix ensures that the default
port 3456 is displayed instead, matching the actual behavior of the
service which uses 3456 as the default port.

Fixes the issue where `ccr status` shows undefined for port when not
configured explicitly.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 15:10:44 +08:00
musistudio
27fa655425 Merge branch 'main' of github.com:musistudio/claude-code-router 2025-07-30 14:28:14 +08:00
musistudio
ad17b27c3d feat: get all transformers 2025-07-30 11:55:55 +08:00
musistudio
112d7ef8f9 feat: add UI build to build process
- Created separate build script to handle both CLI and UI building
- Added automatic UI dependency installation
- Copy built UI artifacts to dist directory

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 11:15:05 +08:00
BigUncle
2c44ea73c7 Add API_TIMEOUT_MS configuration option
- Add API_TIMEOUT_MS to config.example.json with default value of 600000ms
- Update README.md and README_zh.md to document the new configuration option
- Modify codeCommand.ts to use the configured timeout value instead of hardcoded 600000ms
- Default to 10 minutes (600000ms) if not set in config
2025-07-28 00:51:04 +08:00
musistudio
604cc8e1dc fix the stuttering issue on windows 2025-07-27 16:10:48 +08:00
JoeChen
3bbfebb5e3 Feature: 添加可选的长上下文模型阈值配置 2025-07-26 12:13:55 +08:00
musistudio
179bab605e release v1.0.27 to fix some bugs and enhance tools 2025-07-25 17:17:14 +08:00
jinhui.li
202402a123 update readme 2025-07-25 14:27:34 +08:00
musi
b9d556ff1b add release command 2025-07-21 16:48:30 +08:00
musi
194a664f20 update cli help text 2025-07-21 15:34:39 +08:00