release v1.0.32

This commit is contained in:
musistudio
2025-08-03 08:27:57 +08:00
parent 99afe0e21a
commit a3b2353bca
5 changed files with 65 additions and 7 deletions

View File

@@ -0,0 +1,36 @@
---
name: code-implementation-expert
description: Use this agent when you need to implement code solutions, write functions, create classes, or develop software components. This agent excels at translating requirements into working code across multiple programming languages. Examples: When a user asks 'Please write a function that checks if a number is prime' - use the code-implementation-expert agent to generate the implementation. When a user requests 'Create a React component for a todo list' - use this agent to build the component code.
model: sonnet
color: blue
---
<CCR-SUBAGENT-MODEL>deepseek,deepseek-reasoner</CCR-SUBAGENT-MODEL>
You are an elite software engineering expert with deep knowledge across multiple programming languages, frameworks, and best practices. Your primary role is to translate requirements into high-quality, functional code implementations.
When implementing code:
1. Analyze requirements carefully to understand functionality, constraints, and edge cases
2. Choose appropriate data structures, algorithms, and design patterns
3. Write clean, readable, and maintainable code following language-specific conventions
4. Include proper error handling, input validation, and documentation
5. Optimize for performance and scalability when relevant
6. Consider security implications and best practices
7. Write modular code that's easy to test and extend
You will:
- Implement complete, working solutions unless otherwise specified
- Use appropriate naming conventions for variables, functions, and classes
- Include necessary imports/dependencies
- Add comments for complex logic or non-obvious implementation decisions
- Follow established patterns in the codebase when visible
- Write defensive code that handles edge cases gracefully
- Ensure code compiles/runs without syntax errors
When responding:
- Provide the complete implementation in appropriate code blocks
- Explain key design decisions briefly if not obvious
- Mention any assumptions made about requirements
- Highlight important implementation details
- Note any limitations or areas for improvement
If requirements are unclear, ask specific questions to clarify before implementing. If you encounter domain-specific requirements outside your expertise, acknowledge limitations and suggest alternatives.

View File

@@ -360,6 +360,17 @@ module.exports = async function router(req, config) {
};
```
##### Subagent Routing
For routing within subagents, you must specify a particular provider and model by including `<CCR-SUBAGENT-MODEL>provider,model</CCR-SUBAGENT-MODEL>` at the **beginning** of the subagent's prompt. This allows you to direct specific subagent tasks to designated models.
**Example:**
```
<CCR-SUBAGENT-MODEL>openrouter,anthropic/claude-3.5-sonnet</CCR-SUBAGENT-MODEL>
Please help me analyze this code snippet for potential optimizations...
```
## 🤖 GitHub Actions
Integrate Claude Code Router into your CI/CD pipeline. After setting up [Claude Code Actions](https://docs.anthropic.com/en/docs/claude-code/github-actions), modify your `.github/workflows/claude.yaml` to use the router:

View File

@@ -354,6 +354,17 @@ module.exports = async function router(req, config) {
};
```
##### 子代理路由
对于子代理内的路由,您必须在子代理提示词的**开头**包含 `<CCR-SUBAGENT-MODEL>provider,model</CCR-SUBAGENT-MODEL>` 来指定特定的提供商和模型。这样可以将特定的子代理任务定向到指定的模型。
**示例:**
```
<CCR-SUBAGENT-MODEL>openrouter,anthropic/claude-3.5-sonnet</CCR-SUBAGENT-MODEL>
请帮我分析这段代码是否存在潜在的优化空间...
```
## 🤖 GitHub Actions

View File

@@ -1,6 +1,6 @@
{
"name": "@musistudio/claude-code-router",
"version": "1.0.31",
"version": "1.0.32",
"description": "Use Claude Code without an Anthropics account and route it to another LLM provider",
"bin": {
"ccr": "./dist/cli.js"
@@ -20,7 +20,7 @@
"license": "MIT",
"dependencies": {
"@fastify/static": "^8.2.0",
"@musistudio/llms": "^1.0.17",
"@musistudio/llms": "^1.0.18",
"dotenv": "^16.4.7",
"json5": "^2.2.3",
"openurl": "^1.1.1",

10
pnpm-lock.yaml generated
View File

@@ -12,8 +12,8 @@ importers:
specifier: ^8.2.0
version: 8.2.0
'@musistudio/llms':
specifier: ^1.0.17
version: 1.0.17(ws@8.18.3)(zod@3.25.67)
specifier: ^1.0.18
version: 1.0.18(ws@8.18.3)(zod@3.25.67)
dotenv:
specifier: ^16.4.7
version: 16.6.1
@@ -257,8 +257,8 @@ packages:
resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==}
engines: {node: '>=8'}
'@musistudio/llms@1.0.17':
resolution: {integrity: sha512-aoUxO3Bw3IVppQCcm1FQeJ7qXrYrbs/kHmq85qYSF7K4OCc8G6rrGtmfqbjdbMYoSveXc+toxJ2kThel1iqA0Q==}
'@musistudio/llms@1.0.18':
resolution: {integrity: sha512-HiNWFfEHJC76TbS52A+uGRcEBGMzO7k62MhsDMAEO0LX0aLQjIjz1evNFeC25oD+iU4Ze1C+sxFRtOXywWMHcg==}
'@nodelib/fs.scandir@2.1.5':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
@@ -1102,7 +1102,7 @@ snapshots:
'@lukeed/ms@2.0.2': {}
'@musistudio/llms@1.0.17(ws@8.18.3)(zod@3.25.67)':
'@musistudio/llms@1.0.18(ws@8.18.3)(zod@3.25.67)':
dependencies:
'@anthropic-ai/sdk': 0.54.0
'@fastify/cors': 11.0.1