Commit Graph
47 Commits
Author SHA1 Message Date
musistudio 0e509528c2 add ccr statusline command 2025-08-15 23:50:57 +08:00
BigUncleandqwen-cli <https://github.com/QwenLM/qwen-code> 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 b856e1e11b relese v1.0.34 to optimize the log 2025-08-10 21:37:48 +08:00
musistudioandClaude 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
musiandGitHub a958f18305 Merge branch 'main' into bugfix/fix-code-args-handling 2025-08-06 20:53:24 +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
FlintyLemmingandGitHub d684319261 feat: support setting ANTHROPIC_SMALL_FAST_MODEL from config file 2025-08-04 15:03:22 +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
musistudioandClaude 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
musistudioandClaude 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
musistudioandClaude 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
musistudioandClaude 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
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
musi b9d556ff1b add release command 2025-07-21 16:48:30 +08:00
musi 5e14b9b0e1 release v1.0.24 to support custom router 2025-07-21 15:13:58 +08:00
jinhui.li 7165953b50 release v1.0.23 to support websearch 2025-07-21 10:46:53 +08:00
jinhui.li d0de78eaf0 support configuring the port 2025-07-20 01:00:33 +08:00
jinhui.li 49502e1534 support authentication via APIKEY configuration 2025-07-17 12:49:14 +08:00
musi 8f8eeacc3d fix fallback to the default model when no router configuration is provided 2025-07-10 20:51:30 +08:00
musi 3260d1b6b8 release v1.0.15 2025-07-07 15:03:48 +08:00
jinhui.li 30c764828a switch to llms 2025-07-02 13:24:37 +08:00
Evyatar108andGitHub c984b57585 Fix multi/parallel-tool invocation 2025-06-20 00:16:47 -07:00
jinhui.li dd29cf895f fix API Error: A.map is not a function 2025-06-17 09:01:53 +08:00
musi d0d164e8ea release v1.0.7 2025-06-17 06:12:59 +08:00
jinhui.li 329b5d9b9b fix API Error when using proxy 2025-06-16 12:43:44 +08:00
musi a3ec2c223d fix not working without router 2025-06-15 20:45:32 +08:00
jinhui.li 1aa6dbe51a add CLAUDE_PATH env variable 2025-06-15 20:26:35 +08:00
jinhui.li 9a89250d79 use the router to dispatch different models: background,longcontext and think 2025-06-14 19:48:29 +08:00
jinhui.li 84e76f24b0 fix the issue of multiple calude using one server by claude code 2025-06-12 09:58:05 +08:00
musi c9059f146d fix miss api 2025-06-10 21:43:01 +08:00
jinhui.li 2cc91ada5c add cli 2025-06-10 12:55:25 +08:00
jinhui.li 089654871c support plugins 2025-03-31 22:28:02 +08:00
jinhui.li 93fcd77544 support deepseek-v3-20250324 2025-03-25 14:51:28 +08:00