Decision Economic Optimizer
Deterministic decision-ranking API with HTTP 402 payments and outcome credits.
- License 许可
- MIT
- 最近更新
- 2026-06-07
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- Decision Economic Optimizer
- version
- 0.1.0
- homepage
- https://which-llm.com
- always_on
- false
- description
- Deterministic decision-ranking API with HTTP 402 payments and outcome credits.
- sensitivity
- high
- install_mechanism
- instruction_only
- primary_credential
- WALLET_CREDENTIALS
- credentials_required
- true
- disable_model_invocation
- false
- downloads_code_on_install
- false
- writes_to_disk_on_install
- false
03 SKILL.md 正文
Which‑LLM: Outcome‑Driven Decision Optimizer
Overview
Use this skill when you need a deterministic recommendation for which LLM to use under explicit constraints such as cost and quality.
This skill is for calling the Which‑LLM API. It does not run an LLM itself. For paid requests, the AI bot needs access to a crypto wallet.
When to use it
- Pick the cheapest model that still meets a quality target
- Choose a fallback model if the preferred one fails
- Keep model selection deterministic and auditable
- Report execution results and earn credits for later requests
Quick Reference
- API base URL:
https://api.which-llm.com - Primary paid endpoint:
POST /decision/optimize - Outcome endpoint:
POST /decision/outcome - Free discovery endpoints:
GET /capabilities,GET /pricing,GET /status - Payment asset:
USDC - Supported chains: Base, Ethereum, Arbitrum, Optimism, Avalanche
Registry Summary Expectations
Primary credential:WALLET_CREDENTIALSInstall mechanism: instruction-onlyWrites to disk on install:falseDownloads code on install:false
Prerequisites
Before using this skill, have the following ready:
- Ability to make HTTPS requests to
https://api.which-llm.com - Ability to send and receive JSON
- AI bot access to a crypto wallet for paid requests
What this skill does
- Sends requests to the Which‑LLM API
- Uses
POST /decision/optimizeto get a recommended model and fallback plan - Uses
POST /decision/outcometo report real execution results - Explains the request and response shapes for the public API
- Describes how to retry requests after payment has been satisfied externally
What this skill does not do
- It does not call an LLM directly
- It does not execute arbitrary code from your prompt
- It does not require unrelated files or system access beyond API usage and payment handling
Runtime Scope
always_on: false: the skill is not force-installed and does not run continuouslydisable_model_invocation: false: an agent may invoke it on demand- The skill is limited to outbound HTTP API usage and response handling
- For paid requests, the AI bot needs access to a crypto wallet
Payment Model
Paid calls may use HTTP 402 Payment Required.
High-level flow:
- Call
POST /decision/optimize - If the API returns
402, inspect fields such asrequired_amount,accepts, andpayment_reference - Satisfy the payment requirement outside this skill using host- or client-managed infrastructure
- Retry the same request with payment proof headers if available
This skill documents the API behavior and payment-related response handling. The wallet requirement is limited to paid requests.
Endpoints
GET /capabilities
Use this to discover supported constraints, decision types, and payment behavior.
GET /pricing
Use this to check current pricing and supported chains before making a paid request.
GET /status
Use this for service-health checks.
POST /decision/optimize
This is the main endpoint. Send the goal and constraints, then receive:
recommended_modelfallback_plan- decision metadata and explainability fields
Typical request shape:
{
"goal": "Summarize customer feedback emails into a 5-bullet executive summary",
"constraints": {
"min_quality_score": 0.8,
"max_cost_usd": 0.01
},
"workload": {
"input_tokens": 1200,
"output_tokens": 300,
"requests": 1
},
"task_type": "summarize"
}
If payment is required, the API may first return 402 with fields such as:
required_amountcurrencyaccepts[].chainaccepts[].pay_topayment_reference
Retry the request after external payment handling with:
X-Payment-ChainX-Payment-TxX-PayerX-Payment-AmountX-Payment-Asset
If you have a valid credit token, also send:
X-Credit-Token
POST /decision/outcome
Use this after running the recommended model. Report what actually happened so the system can issue a credit token for future use.
Typical request shape:
{
"decision_id": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
"option_used": "openai/gpt-4o-mini",
"actual_cost": 0.008,
"actual_latency": 650,
"quality_score": 0.86,
"success": true
}
Typical response includes:
statusdecision_idoutcome_hashrefund_credit.credit_token
Request Strategy For Agents
- Call
GET /capabilitiesorGET /pricingfirst if you need to discover current payment behavior - Use
POST /decision/optimizeonly when you actually need model selection help - Reuse the returned decision data rather than repeatedly asking the same question
- After running the chosen model, call
POST /decision/outcometo earn credits - Use the host or client payment flow when a paid request requires wallet-backed settlement
Troubleshooting
PAYMENT_REQUIRED
The endpoint needs payment first. Read the 402 response, satisfy the payment requirement externally, then retry with payment proof headers if available.
PAYMENT_INVALID
Check:
- exact amount sent
- correct chain
- correct recipient
- confirmed transaction
- headers match the actual transaction
NO_FEASIBLE_OPTIONS
Your cost and quality constraints are too strict for the available models. Relax the budget or quality threshold and retry.
RATE_LIMIT_EXCEEDED
Back off and retry later. Use an idempotency key for safe retries.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
ceaser
Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).
ceaser-send
Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
moldium
Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.