mirror of
https://github.com/instructkr/claw-code.git
synced 2026-11-29 00:06:13 +08:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dad6b9780c | ||
|
|
578e910bd8 | ||
|
|
ecd697f9f2 | ||
|
|
ca8752613b | ||
|
|
a5c2775e81 | ||
|
|
659f630cce | ||
|
|
d53a088278 |
No files matched your search
@@ -170,24 +170,24 @@ curl -sS "https://llmtr.com/v1/models" \
|
||||
| jq -r '.data[] | "\(.id)\t\(.top_provider.max_completion_tokens)"'
|
||||
```
|
||||
|
||||
## UberLLM
|
||||
## MartLLM
|
||||
|
||||
[UberLLM](https://uberllm.dev) is a pay-as-you-go OpenAI-compatible gateway (prepaid, no free tier). Set `OPENAI_BASE_URL` to `https://api.uberllm.dev/v1` and `OPENAI_API_KEY` to a bearer key (`ull_...`).
|
||||
[MartLLM](https://martllm.com) is a pay-as-you-go OpenAI-compatible gateway (prepaid, no free tier). Set `OPENAI_BASE_URL` to `https://api.martllm.com/v1` and `OPENAI_API_KEY` to a bearer key (`ull_...`).
|
||||
|
||||
```bash
|
||||
export OPENAI_BASE_URL="https://api.uberllm.dev/v1"
|
||||
export OPENAI_BASE_URL="https://api.martllm.com/v1"
|
||||
export OPENAI_API_KEY="ull_..."
|
||||
claw --model "local/deepseek/deepseek-v4-flash" prompt "Reply exactly HELLO_WORLD_123"
|
||||
```
|
||||
|
||||
UberLLM ids are vendor-prefixed (`deepseek/deepseek-v4-flash`, `moonshotai/kimi-k2.6`, `qwen/qwen3.8-flash`). Put `local/` in front of every one: the hatch selects the OpenAI-compatible transport and is removed, so the catalog id goes out unchanged. Some prefixes would otherwise pick a native route; a bare `qwen/qwen3.8-flash`, for example, goes to DashScope and asks for `DASHSCOPE_API_KEY`.
|
||||
MartLLM ids are vendor-prefixed (`deepseek/deepseek-v4-flash`, `moonshotai/kimi-k2.6`, `qwen/qwen3.8-flash`). Put `local/` in front of every one: the hatch selects the OpenAI-compatible transport and is removed, so the catalog id goes out unchanged. Some prefixes would otherwise pick a native route; a bare `qwen/qwen3.8-flash`, for example, goes to DashScope and asks for `DASHSCOPE_API_KEY`.
|
||||
|
||||
Claw asks for up to 64,000 output tokens on these routes. UberLLM does not reject that on a model with a smaller output limit (for example `aion-labs/aion-3-0-mini`, 32,768); the answer is simply bounded by the model's limit, listed as `max_output_tokens` in the catalog below.
|
||||
Claw asks for up to 64,000 output tokens on these routes. MartLLM does not reject that on a model with a smaller output limit (for example `aion-labs/aion-3-0-mini`, 32,768); the answer is simply bounded by the model's limit, listed as `max_output_tokens` in the catalog below.
|
||||
|
||||
The public model list does not need a key:
|
||||
|
||||
```bash
|
||||
curl -sS "https://api.uberllm.dev/v1/models" \
|
||||
curl -sS "https://api.martllm.com/v1/models" \
|
||||
| jq -r '.data[] | "\(.id)\t\(.max_output_tokens)"'
|
||||
```
|
||||
|
||||
@@ -260,6 +260,124 @@ curl -sS "https://router.requesty.ai/v1/models" \
|
||||
|
||||
See the [Requesty docs](https://docs.requesty.ai) for keys and account setup.
|
||||
|
||||
## WorldRouter
|
||||
|
||||
[WorldRouter](https://www.worldrouter.ai) is an OpenAI-compatible gateway for Claude, GPT, Gemini, DeepSeek, Kimi, and GLM models. Set `OPENAI_BASE_URL` to `https://inference-api.worldrouter.ai/v1` and `OPENAI_API_KEY` to your WorldRouter key.
|
||||
|
||||
```bash
|
||||
export WORLDROUTER_API_KEY="your-worldrouter-api-key"
|
||||
export OPENAI_BASE_URL="https://inference-api.worldrouter.ai/v1"
|
||||
export OPENAI_API_KEY="$WORLDROUTER_API_KEY"
|
||||
claw --model "local/deepseek-v4-flash" prompt "Reply exactly HELLO_WORLD_123"
|
||||
```
|
||||
|
||||
WorldRouter ids are bare names without a vendor prefix (`deepseek-v4-flash`, `gpt-5.4`, `claude-sonnet-5-5`, `gemini-4-neon`). Put `local/` in front of every one: the hatch selects the OpenAI-compatible transport and is removed, so the id goes out unchanged. Without it, a bare `claude-` id picks the native Anthropic route and asks for `ANTHROPIC_API_KEY`.
|
||||
|
||||
WorldRouter also serves the Anthropic Messages API, so the native route works as well: set `ANTHROPIC_BASE_URL` to `https://inference-api.worldrouter.ai` (no `/v1`) and `ANTHROPIC_API_KEY` to the same key, then run `--model "claude-sonnet-5-5"`.
|
||||
|
||||
The model list needs your key and shows the ids that key can call:
|
||||
|
||||
```bash
|
||||
curl -sS "https://inference-api.worldrouter.ai/v1/models" \
|
||||
-H "Authorization: Bearer $OPENAI_API_KEY" | jq -r '.data[].id'
|
||||
```
|
||||
|
||||
See the [WorldRouter quickstart](https://www.worldrouter.ai/docs/quickstart) for keys and account setup.
|
||||
|
||||
## onomeo
|
||||
|
||||
[onomeo](https://onomeo.com) is an OpenAI-compatible gateway for Claude, GPT, Gemini and DeepSeek models. Set `OPENAI_BASE_URL` to `https://onomeo.com/v1` and `OPENAI_API_KEY` to your onomeo key.
|
||||
|
||||
```bash
|
||||
export ONOMEO_API_KEY="your-onomeo-api-key"
|
||||
export OPENAI_BASE_URL="https://onomeo.com/v1"
|
||||
export OPENAI_API_KEY="$ONOMEO_API_KEY"
|
||||
claw --model "local/deepseek-v4.1-flash" prompt "Reply exactly HELLO_WORLD_123"
|
||||
```
|
||||
|
||||
onomeo ids are bare names without a vendor prefix (`deepseek-v4.1-flash`, `claude-sonnet-5.5`, `gpt-6.2-sol`). Put `local/` in front of every one: the hatch selects the OpenAI-compatible transport and is removed, so the id goes out unchanged. Without it, a bare `claude-` id picks the native Anthropic route and asks for `ANTHROPIC_API_KEY`.
|
||||
|
||||
onomeo also serves the Anthropic Messages API, so the native route works as well: set `ANTHROPIC_BASE_URL` to `https://onomeo.com` (no `/v1`) and `ANTHROPIC_API_KEY` to the same key, then run `--model "claude-sonnet-5.5"`.
|
||||
|
||||
The model list needs your key and shows the ids that key can call:
|
||||
|
||||
```bash
|
||||
curl -sS "https://onomeo.com/v1/models" \
|
||||
-H "Authorization: Bearer $OPENAI_API_KEY" | jq -r '.data[].id'
|
||||
```
|
||||
|
||||
See the [onomeo integration guides](https://onomeo.com/integrations) for keys and account setup.
|
||||
|
||||
## Straitly
|
||||
|
||||
[Straitly](https://straitly.ai) is an AI gateway with one OpenAI-compatible API key for 150+ models, including Claude, GPT, Gemini, Grok and DeepSeek. Set `OPENAI_BASE_URL` to `https://api.straitly.ai/v1` and `OPENAI_API_KEY` to your Straitly key.
|
||||
|
||||
```bash
|
||||
export STRAITLY_API_KEY="your-straitly-api-key"
|
||||
export OPENAI_BASE_URL="https://api.straitly.ai/v1"
|
||||
export OPENAI_API_KEY="$STRAITLY_API_KEY"
|
||||
claw --model "local/deepseek/deepseek-v4-1-flash" prompt "Reply exactly HELLO_WORLD_123"
|
||||
```
|
||||
|
||||
Straitly ids are vendor-prefixed (`owner/model`, such as `deepseek/deepseek-v4-1-flash`). Put `local/` in front of every one: the hatch selects the OpenAI-compatible transport and is removed, so the catalog id goes out unchanged. Without it, an id that starts with `anthropic/` picks the native Anthropic route and asks for `ANTHROPIC_API_KEY`.
|
||||
|
||||
Claw asks for up to 64,000 output tokens on these routes, so pick a model whose output limit is at least that. `deepseek/deepseek-v4-1-flash` allows 1,048,576. Each model's limit is listed as `top_provider.max_completion_tokens` in the catalog below.
|
||||
|
||||
The public model list does not need a key:
|
||||
|
||||
```bash
|
||||
curl -sS "https://api.straitly.ai/v1/models" \
|
||||
| jq -r '.data[] | "\(.id)\t\(.context_length)\t\(.top_provider.max_completion_tokens)"'
|
||||
```
|
||||
|
||||
See the [Straitly quickstart](https://straitly.ai/docs/quickstart) for keys and account setup.
|
||||
|
||||
## TeamoRouter
|
||||
|
||||
[TeamoRouter](https://teamorouter.com) is an OpenAI-compatible gateway for GLM, Kimi, DeepSeek, Qwen, Claude, GPT, Gemini and other model families behind one key. Set `OPENAI_BASE_URL` to `https://api.teamorouter.com/v1` and `OPENAI_API_KEY` to your TeamoRouter key.
|
||||
|
||||
```bash
|
||||
export TEAMOROUTER_API_KEY="your-teamorouter-api-key"
|
||||
export OPENAI_BASE_URL="https://api.teamorouter.com/v1"
|
||||
export OPENAI_API_KEY="$TEAMOROUTER_API_KEY"
|
||||
claw --model "local/glm-5.3" prompt "Reply exactly HELLO_WORLD_123"
|
||||
```
|
||||
|
||||
TeamoRouter ids are bare names without a vendor prefix (`glm-5.3`, `deepseek-v4-flash`, `claude-sonnet-5-5`). Put `local/` in front of every one: the hatch selects the OpenAI-compatible transport and is removed, so the id goes out unchanged. Without it, a bare `claude-` id picks the native Anthropic route, and a bare `qwen` or `kimi` id goes to DashScope.
|
||||
|
||||
Claw asks for up to 64,000 output tokens on these routes. `glm-5.3`, `deepseek-v4-flash` and `claude-sonnet-5-5` accept that; models with a lower cap list it as `max_output_tokens` in the public catalog, which does not need a key:
|
||||
|
||||
```bash
|
||||
curl -sS "https://api.teamorouter.com/v1/models/pricing" \
|
||||
| jq -r '.models[] | "\(.id)\t\(.context_window)\t\(.max_output_tokens)"'
|
||||
```
|
||||
|
||||
See the [TeamoRouter docs](https://teamorouter.com/docs) for keys and account setup.
|
||||
|
||||
## TrustedRouter
|
||||
|
||||
[TrustedRouter](https://trustedrouter.com) is an OpenAI-compatible gateway that routes to Anthropic, OpenAI, Google, DeepSeek and other providers behind one key. Set `OPENAI_BASE_URL` to `https://api.trustedrouter.com/v1` and `OPENAI_API_KEY` to your TrustedRouter key.
|
||||
|
||||
```bash
|
||||
export TRUSTEDROUTER_API_KEY="your-trustedrouter-api-key"
|
||||
export OPENAI_BASE_URL="https://api.trustedrouter.com/v1"
|
||||
export OPENAI_API_KEY="$TRUSTEDROUTER_API_KEY"
|
||||
claw --model "local/deepseek/deepseek-v4-flash" prompt "Reply exactly HELLO_WORLD_123"
|
||||
```
|
||||
|
||||
TrustedRouter ids are vendor-prefixed (`deepseek/deepseek-v4-flash`, `anthropic/claude-sonnet-4.5`). Put `local/` in front of every one: the hatch selects the OpenAI-compatible transport and is removed, so the catalog id goes out unchanged. Without it, an `anthropic/` id picks the native Anthropic route and asks for `ANTHROPIC_API_KEY`. The routed model `trustedrouter/auto`, which picks a model per request, takes the same hatch: `--model "local/trustedrouter/auto"`.
|
||||
|
||||
Claw asks for up to 64,000 output tokens on these routes, so pick a model whose output limit is at least that. `deepseek/deepseek-v4-flash` allows 393,216. Each model's limit is listed as `top_provider.max_completion_tokens` in the catalog below.
|
||||
|
||||
The public model list does not need a key:
|
||||
|
||||
```bash
|
||||
curl -sS "https://api.trustedrouter.com/v1/models" \
|
||||
| jq -r '.data[] | "\(.id)\t\(.context_length)\t\(.top_provider.max_completion_tokens)"'
|
||||
```
|
||||
|
||||
See the [TrustedRouter docs](https://trustedrouter.com/docs) for keys and account setup.
|
||||
|
||||
## Local skills install from disk
|
||||
|
||||
Skills are discovered from Claw skill roots such as `.claw/skills/` in a workspace and `~/.claw/skills/` for user-level installs. Legacy `.codex/skills/` roots may also be scanned for compatibility, but new local Claw projects should prefer `.claw/skills/`.
|
||||
|
||||
@@ -400,7 +400,7 @@ mod tests {
|
||||
fn executes_simple_command() {
|
||||
let output = execute_bash(BashCommandInput {
|
||||
command: String::from("printf 'hello'"),
|
||||
timeout: Some(1_000),
|
||||
timeout: Some(30_000),
|
||||
description: None,
|
||||
run_in_background: Some(false),
|
||||
dangerously_disable_sandbox: Some(false),
|
||||
@@ -411,8 +411,12 @@ mod tests {
|
||||
})
|
||||
.expect("bash command should execute");
|
||||
|
||||
assert!(
|
||||
!output.interrupted,
|
||||
"command was interrupted (timeout?); stderr: {}",
|
||||
output.stderr
|
||||
);
|
||||
assert_eq!(output.stdout, "hello");
|
||||
assert!(!output.interrupted);
|
||||
assert!(output.sandbox_status.is_some());
|
||||
}
|
||||
|
||||
@@ -420,7 +424,7 @@ mod tests {
|
||||
fn disables_sandbox_when_requested() {
|
||||
let output = execute_bash(BashCommandInput {
|
||||
command: String::from("printf 'hello'"),
|
||||
timeout: Some(1_000),
|
||||
timeout: Some(30_000),
|
||||
description: None,
|
||||
run_in_background: Some(false),
|
||||
dangerously_disable_sandbox: Some(true),
|
||||
@@ -463,7 +467,7 @@ mod tests {
|
||||
fn prevents_stdin_hangs_by_redirecting_to_null() {
|
||||
let output = execute_bash(BashCommandInput {
|
||||
command: String::from("cat"),
|
||||
timeout: Some(2_000),
|
||||
timeout: Some(30_000),
|
||||
description: None,
|
||||
run_in_background: Some(false),
|
||||
dangerously_disable_sandbox: Some(true),
|
||||
|
||||
Reference in new issue
Block a user