OpenRouter上线2款秘密试用模型:Sonoma Dusk Alpha 和 Sonoma Sky Alpha
Dusk模型定位是快速、支持图片输入和并行工具调用能力的200万上下文窗口通用模型。
而Sky模型被定义为最大化智能、支持图片输入和并行工具调用能力的200万上下文窗口通用模型,根据目前的上下文和回答描述上看,极有可能是Gemini 3的提前测试版本。
目前OpenRouter提供了免费的试用。
我目前是结合使用开源的Crush来使用的,主要是接入比较方便,使用CLI不需要第三方的转发了。
以下详情的介绍使用和配置
Crush目前完全的开源,可以方便地接入多种模型使用CLI。
安装使用包管理器:
#Homebrew brewinstallcharmbracelet/tap/crush #NPM npminstall-g@charmland/crush #ArchLinux(btw) yay-Scrush-bin #Nix nixrungithub:numtide/nix-ai-tools#crush
Windows 用户:
#Winget wingetinstallcharmbracelet.crush #Scoop scoopbucketaddcharmhttps://github.com/charmbracelet/scoop-bucket.git scoopinstallcrush
Crush 的默认模型列表在 Catwalk 中管理,这是一个社区支持的、开源的 Crush 兼容模型仓库。
Crush 无需配置即可很好地运行,可以在项目本地或全局添加配置,优先级如下:
MAC:
$HOME/.config/crush/crush.json
Windows:
%USERPROFILE%\AppData\Local\crush\crush.json
配置本身为就是一个JSON 对象:
{
"this-setting":{"this":"that"},
"that-setting":["ceci","cela"]}Crush 可以使用 LSP 获取额外的上下文信息来帮助做出决策。LSP 可以像这样手动添加:
{
"$schema":"https://charm.land/crush.json",
"lsp":{"go":{"command":"gopls","env":{"GOTOOLCHAIN":"go1.24.5"}},"typescript":{"command":"typescript-language-server","args":["--stdio"]},"nix":{"command":"nil"}
}}Crush 还通过三种传输类型支持模型上下文协议(MCP)服务器:用于命令行服务器的 stdio、用于 HTTP 端点的 http 和用于服务器发送事件的 sse。支持使用 $(echo $VAR) 语法进行环境变量扩展。
{
"$schema":"https://charm.land/crush.json",
"mcp":{"filesystem":{"type":"stdio","command":"node","args":["/path/to/mcp-server.js"],"env":{"NODE_ENV":"production"}},"github":{"type":"http","url":"https://example.com/mcp/","headers":{"Authorization":"$(echoBearer$EXAMPLE_MCP_TOKEN)"}},"streaming-service":{"type":"sse","url":"https://example.com/mcp/sse","headers":{"API-Key":"$(echo$API_KEY)"}}
}}默认情况下,Crush 在运行工具调用之前会请求许可,也可以允许工具在不提示权限的情况下执行。
{
"$schema":"https://charm.land/crush.json",
"permissions":{"allowed_tools":["view","ls","grep","edit","mcp_context7_get-library-doc"]
}}使用 --yolo 标志运行 Crush 来完全跳过所有权限提示。
Crush 支持兼容 OpenAI 和 Anthropic API 的自定义提供商配置。
以下是 Sonoma 的配置示例,它使用兼容 OpenAI 的 API。不要忘记在环境中设置 API_KEY。
{
"$schema":"https://charm.land/crush.json",
"providers":{"openrouter":{"type":"openai","base_url":"https://openrouter.ai/api/v1","api_key":"API_KEY,
"extra_headers":{
"HTTP-Referer":"https://localhost","X-Title":"CrushCLI"},"models":[{"id":"openrouter/sonoma-dusk-alpha","name":"SonomaDuskAlpha","cost_per_1m_in":0,"cost_per_1m_out":0,"context_window":2000000,"default_max_tokens":4000,"supports_attachments":true}]}
}}%配置完成后
测试如下
CLI 还包含一些辅助命令,使查看最近的日志:
#打印最后1000行crushlogs#打印最后500行crushlogs--tail500#实时跟踪日志crushlogs--follow
| 欢迎光临 链载Ai (https://www.lianzai.com/) | Powered by Discuz! X3.5 |