DeepThonk
v0.4.0Provider-neutral OpenDeepThink reasoning server: generate, judge, rank, mutate.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
deepthonk.plan Plan DeepThonk Budget
Estimate model calls for a DeepThonk profile.
| Parameter | Type | Description |
|---|---|---|
config_path | string | Optional DeepThonk YAML config path. |
k | integer | |
m | integer | |
n | integer | |
profile | string | |
profile_name | string | Saved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path. |
t | integer |
deepthonk.start Start DeepThonk Job
Start DeepThonk in the background and persist status in the run directory.
| Parameter | Type | Description |
|---|---|---|
task * | string | Task text to solve. MCP tools do not read task files. |
api_key_env | string | Environment variable that contains the API key. |
base_url | string | OpenAI-compatible base URL, ending at /v1. |
concurrency | object | Per-phase concurrency overrides. |
config_path | string | Optional DeepThonk YAML config path, such as ~/.config/deepthonk/config.yaml. |
critique_limits | object | Critique aggregation bounds. |
finalizer_model | string | Optional model used to polish the winning candidate. |
generator_model | string | Model used for initial candidate generation. |
include_prompts | boolean | Store rendered prompts in candidate/comparison metadata. |
include_raw_model_outputs | boolean | Store raw provider responses in trace metadata. |
judge_model | string | Model used for pairwise judging. |
judge_temperature | number | Temperature for pairwise judging. |
k | integer | Comparisons per candidate per mutation-generation round. |
lambda | number | Bradley-Terry L2 regularization. Defaults to 0.01. |
m | integer | Comparisons per candidate in the final dense ranking round. Mutation count per generation is n - ceil(n/4), not m. |
max_calls | integer | Maximum logical model invocations, including failed calls and invalid-JSON retries; internal HTTP retries are reported separately. |
max_input_tokens | integer | Maximum recorded input tokens before the run stops at a phase boundary. |
max_output_tokens | integer | Maximum recorded output tokens before the run stops at a phase boundary. |
max_usd | number | Maximum estimated USD spend; requires matching budget.prices in config. |
model_output_tokens | object | Per-role model output token caps. |
mutate_temperature | number | Temperature for critique-guided mutation. |
mutator_model | string | Model used for critique-guided mutation. |
n | integer | Population size override. Defaults to the profile's n. |
profile | string | Run profile. quick is safest for smoke tests; paper plans 285 calls. |
profile_name | string | Saved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path. |
prompt_style | string | Prompt template style. Defaults to paper-programming for the paper profile, general otherwise. |
prompts | object | Optional per-phase prompt template overrides. Templates use {task}, {rubric}, {candidate}, {candidateA}, {candidateB}, {critique} placeholders. Use {{ and }} to escape literal braces. See docs/customi… |
provider | string | Provider label. Built-ins include fake, deepseek, openrouter, and openai-compatible; custom labels require base_url. |
provider_max_concurrency | integer | Process-shared maximum concurrent calls to this provider route. |
rank | object | Final ranking mode, degree, seed, and logical-call limit. |
request_timeout_ms | integer | Logical provider-call deadline in milliseconds, including body reads and retry waits. |
rubric | string | Optional judging rubric text. |
run_dir | string | Directory for trace files. |
run_id | string | Optional stable caller-supplied run ID. |
sample_temperature | number | Temperature for initial candidate generation. |
sampling_cost_priority | number | MCP Sampling model preference for lower cost, from 0 to 1. |
sampling_intelligence_priority | number | MCP Sampling model preference for intelligence, from 0 to 1. |
sampling_model_hints | array | Optional MCP Sampling model hints. Hints guide host model choice but do not enforce it. |
sampling_speed_priority | number | MCP Sampling model preference for speed, from 0 to 1. |
seed | integer | Deterministic seed for pair ordering and IDs. |
supports_json_mode | boolean | Whether the base OpenAI-compatible provider supports response_format JSON mode. |
t | integer | Number of mutation generations (t=0 disables mutation rounds). |
deepthonk.status DeepThonk Job Status
Read persisted job/run status from a run directory.
| Parameter | Type | Description |
|---|---|---|
job_id | string | Job ID returned by deepthonk.start. |
run_dir | string | Run directory returned by deepthonk.start or deepthonk.run. |
deepthonk.result DeepThonk Job Result
Return final summary/resource URIs when a background job is complete.
| Parameter | Type | Description |
|---|---|---|
job_id | string | Job ID returned by deepthonk.start. |
run_dir | string | Run directory returned by deepthonk.start or deepthonk.run. |
deepthonk.cancel Cancel DeepThonk Job
Request cancellation for a running job by writing cancel.json in the run directory.
| Parameter | Type | Description |
|---|---|---|
job_id | string | Job ID returned by deepthonk.start. |
run_dir | string | Run directory returned by deepthonk.start or deepthonk.run. |
deepthonk.lock_inspect Inspect DeepThonk Run Lock
Inspect run.lock and return its exact fingerprint without mutating it.
| Parameter | Type | Description |
|---|---|---|
run_dir * | string | Run directory containing the lock to inspect. |
deepthonk.lock_reclaim Reclaim DeepThonk Run Lock
Reclaim run.lock only when its current bytes match the inspected fingerprint exactly.
| Parameter | Type | Description |
|---|---|---|
fingerprint * | string | Exact fingerprint returned by deepthonk.lock_inspect. |
run_dir * | string | Run directory containing the lock to inspect. |
deepthonk.repair_budget Repair Legacy Budget Config
Replace only legacy [redacted] numeric budget fields with explicit original values.
| Parameter | Type | Description |
|---|---|---|
replacements * | object | |
run_dir * | string |
deepthonk.run Run DeepThonk
Run DeepThonk through the shared core engine.
| Parameter | Type | Description |
|---|---|---|
task * | string | Task text to solve. MCP tools do not read task files. |
api_key_env | string | Environment variable that contains the API key. |
base_url | string | OpenAI-compatible base URL, ending at /v1. |
concurrency | object | Per-phase concurrency overrides. |
config_path | string | Optional DeepThonk YAML config path, such as ~/.config/deepthonk/config.yaml. |
critique_limits | object | Critique aggregation bounds. |
finalizer_model | string | Optional model used to polish the winning candidate. |
generator_model | string | Model used for initial candidate generation. |
include_prompts | boolean | Store rendered prompts in candidate/comparison metadata. |
include_raw_model_outputs | boolean | Store raw provider responses in trace metadata. |
judge_model | string | Model used for pairwise judging. |
judge_temperature | number | Temperature for pairwise judging. |
k | integer | Comparisons per candidate per mutation-generation round. |
lambda | number | Bradley-Terry L2 regularization. Defaults to 0.01. |
m | integer | Comparisons per candidate in the final dense ranking round. Mutation count per generation is n - ceil(n/4), not m. |
max_calls | integer | Maximum logical model invocations, including failed calls and invalid-JSON retries; internal HTTP retries are reported separately. |
max_input_tokens | integer | Maximum recorded input tokens before the run stops at a phase boundary. |
max_output_tokens | integer | Maximum recorded output tokens before the run stops at a phase boundary. |
max_usd | number | Maximum estimated USD spend; requires matching budget.prices in config. |
model_output_tokens | object | Per-role model output token caps. |
mutate_temperature | number | Temperature for critique-guided mutation. |
mutator_model | string | Model used for critique-guided mutation. |
n | integer | Population size override. Defaults to the profile's n. |
profile | string | Run profile. quick is safest for smoke tests; paper plans 285 calls. |
profile_name | string | Saved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path. |
prompt_style | string | Prompt template style. Defaults to paper-programming for the paper profile, general otherwise. |
prompts | object | Optional per-phase prompt template overrides. Templates use {task}, {rubric}, {candidate}, {candidateA}, {candidateB}, {critique} placeholders. Use {{ and }} to escape literal braces. See docs/customi… |
provider | string | Provider label. Built-ins include fake, deepseek, openrouter, and openai-compatible; custom labels require base_url. |
provider_max_concurrency | integer | Process-shared maximum concurrent calls to this provider route. |
rank | object | Final ranking mode, degree, seed, and logical-call limit. |
request_timeout_ms | integer | Logical provider-call deadline in milliseconds, including body reads and retry waits. |
rubric | string | Optional judging rubric text. |
run_dir | string | Directory for trace files. |
run_id | string | Optional stable caller-supplied run ID. |
sample_temperature | number | Temperature for initial candidate generation. |
sampling_cost_priority | number | MCP Sampling model preference for lower cost, from 0 to 1. |
sampling_intelligence_priority | number | MCP Sampling model preference for intelligence, from 0 to 1. |
sampling_model_hints | array | Optional MCP Sampling model hints. Hints guide host model choice but do not enforce it. |
sampling_speed_priority | number | MCP Sampling model preference for speed, from 0 to 1. |
seed | integer | Deterministic seed for pair ordering and IDs. |
supports_json_mode | boolean | Whether the base OpenAI-compatible provider supports response_format JSON mode. |
t | integer | Number of mutation generations (t=0 disables mutation rounds). |
deepthonk.rank Rank Candidates
Rank supplied candidates with pairwise judging and Bradley-Terry aggregation.
| Parameter | Type | Description |
|---|---|---|
candidates * | array | Candidate texts or {id, content} objects. |
task * | string | Task text the candidates answer. |
api_key_env | string | Environment variable that contains the API key. |
base_url | string | OpenAI-compatible base URL, ending at /v1. |
concurrency | integer | Maximum concurrent pairwise comparisons. |
config_path | string | Optional DeepThonk YAML config path. |
finalizer_model | string | Optional model used to polish the winning candidate. |
generator_model | string | Model used for initial candidate generation. |
judge_model | string | Model used for pairwise judging. |
judge_temperature | number | Temperature for pairwise judging. |
lambda | number | Bradley-Terry L2 regularization. |
model_output_tokens | object | Per-role model output token caps for one-shot operations. |
mutator_model | string | Model used for critique-guided mutation. |
profile | string | Profile used for one-shot defaults. |
profile_name | string | Saved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path. |
prompt_style | string | |
prompts | object | |
provider | string | Provider label. Built-ins include fake, deepseek, openrouter, and openai-compatible; custom labels require base_url. |
provider_max_concurrency | integer | Process-shared maximum concurrent calls to this provider route. |
rank | object | Pair scheduling mode, degree, seed, and logical-call limit. |
request_timeout_ms | integer | Logical provider-call deadline in milliseconds. |
rubric | string | Optional judging rubric text. |
sampling_cost_priority | number | MCP Sampling model preference for lower cost, from 0 to 1. |
sampling_intelligence_priority | number | MCP Sampling model preference for intelligence, from 0 to 1. |
sampling_model_hints | array | Optional MCP Sampling model hints. |
sampling_speed_priority | number | MCP Sampling model preference for speed, from 0 to 1. |
supports_json_mode | boolean | Whether the base OpenAI-compatible provider supports response_format JSON mode. |
deepthonk.mutate Mutate Candidate
Mutate one supplied candidate with critique.
| Parameter | Type | Description |
|---|---|---|
candidate * | string | Candidate text to mutate. |
task * | string | Task text the candidate answers. |
api_key_env | string | Environment variable that contains the API key. |
base_url | string | OpenAI-compatible base URL, ending at /v1. |
config_path | string | Optional DeepThonk YAML config path. |
critique | string | Critique or guidance for mutation. |
finalizer_model | string | Optional model used to polish the winning candidate. |
generator_model | string | Model used for initial candidate generation. |
judge_model | string | Model used for pairwise judging. |
model_output_tokens | object | Per-role model output token caps for one-shot operations. |
mutate_temperature | number | Temperature for mutation. |
mutator_model | string | Model used for critique-guided mutation. |
profile | string | Profile used for one-shot defaults. |
profile_name | string | Saved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path. |
prompt_style | string | |
prompts | object | |
provider | string | Provider label. Built-ins include fake, deepseek, openrouter, and openai-compatible; custom labels require base_url. |
provider_max_concurrency | integer | Process-shared maximum concurrent calls to this provider route. |
request_timeout_ms | integer | Logical provider-call deadline in milliseconds. |
rubric | string | Optional rubric text. |
sampling_cost_priority | number | MCP Sampling model preference for lower cost, from 0 to 1. |
sampling_intelligence_priority | number | MCP Sampling model preference for intelligence, from 0 to 1. |
sampling_model_hints | array | Optional MCP Sampling model hints. |
sampling_speed_priority | number | MCP Sampling model preference for speed, from 0 to 1. |
supports_json_mode | boolean | Whether the base OpenAI-compatible provider supports response_format JSON mode. |
deepthonk.resume Resume Run
Detect resume state (default) or replay an interrupted run with continue: true.
| Parameter | Type | Description |
|---|---|---|
run_dir * | string | |
continue | boolean |
deepthonk.export Export Run
Export a run summary or trace.
| Parameter | Type | Description |
|---|---|---|
run_dir * | string | |
format | string |
deepthonk.profile_list List DeepThonk Profiles
List saved named profiles.
deepthonk.profile_show Show DeepThonk Profile
Show a saved named profile; manually edited secret-shaped values are rejected on load.
| Parameter | Type | Description |
|---|---|---|
name * | string |
deepthonk.profile_save Save DeepThonk Profile
Save a reusable named profile bundle.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
algorithm | object | |
api_key_env | string | |
base_url | string | |
budget | ||
concurrency | ||
force | boolean | |
models | object | |
output | ||
profile | string | |
prompt_style | string | |
prompts | object | |
provider | string | |
providers | object | |
retry |
deepthonk.profile_delete Delete DeepThonk Profile
Delete a saved named profile.
| Parameter | Type | Description |
|---|---|---|
name * | string |