DeepThonk

v0.4.0
io.github.linxule/deepthonk Checked 22 hours ago Published 24 days ago

Provider-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.

ParameterTypeDescription
config_pathstringOptional DeepThonk YAML config path.
kinteger
minteger
ninteger
profilestring
profile_namestringSaved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path.
tinteger

deepthonk.start Start DeepThonk Job

Start DeepThonk in the background and persist status in the run directory.

ParameterTypeDescription
task *stringTask text to solve. MCP tools do not read task files.
api_key_envstringEnvironment variable that contains the API key.
base_urlstringOpenAI-compatible base URL, ending at /v1.
concurrencyobjectPer-phase concurrency overrides.
config_pathstringOptional DeepThonk YAML config path, such as ~/.config/deepthonk/config.yaml.
critique_limitsobjectCritique aggregation bounds.
finalizer_modelstringOptional model used to polish the winning candidate.
generator_modelstringModel used for initial candidate generation.
include_promptsbooleanStore rendered prompts in candidate/comparison metadata.
include_raw_model_outputsbooleanStore raw provider responses in trace metadata.
judge_modelstringModel used for pairwise judging.
judge_temperaturenumberTemperature for pairwise judging.
kintegerComparisons per candidate per mutation-generation round.
lambdanumberBradley-Terry L2 regularization. Defaults to 0.01.
mintegerComparisons per candidate in the final dense ranking round. Mutation count per generation is n - ceil(n/4), not m.
max_callsintegerMaximum logical model invocations, including failed calls and invalid-JSON retries; internal HTTP retries are reported separately.
max_input_tokensintegerMaximum recorded input tokens before the run stops at a phase boundary.
max_output_tokensintegerMaximum recorded output tokens before the run stops at a phase boundary.
max_usdnumberMaximum estimated USD spend; requires matching budget.prices in config.
model_output_tokensobjectPer-role model output token caps.
mutate_temperaturenumberTemperature for critique-guided mutation.
mutator_modelstringModel used for critique-guided mutation.
nintegerPopulation size override. Defaults to the profile's n.
profilestringRun profile. quick is safest for smoke tests; paper plans 285 calls.
profile_namestringSaved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path.
prompt_stylestringPrompt template style. Defaults to paper-programming for the paper profile, general otherwise.
promptsobjectOptional per-phase prompt template overrides. Templates use {task}, {rubric}, {candidate}, {candidateA}, {candidateB}, {critique} placeholders. Use {{ and }} to escape literal braces. See docs/customi…
providerstringProvider label. Built-ins include fake, deepseek, openrouter, and openai-compatible; custom labels require base_url.
provider_max_concurrencyintegerProcess-shared maximum concurrent calls to this provider route.
rankobjectFinal ranking mode, degree, seed, and logical-call limit.
request_timeout_msintegerLogical provider-call deadline in milliseconds, including body reads and retry waits.
rubricstringOptional judging rubric text.
run_dirstringDirectory for trace files.
run_idstringOptional stable caller-supplied run ID.
sample_temperaturenumberTemperature for initial candidate generation.
sampling_cost_prioritynumberMCP Sampling model preference for lower cost, from 0 to 1.
sampling_intelligence_prioritynumberMCP Sampling model preference for intelligence, from 0 to 1.
sampling_model_hintsarrayOptional MCP Sampling model hints. Hints guide host model choice but do not enforce it.
sampling_speed_prioritynumberMCP Sampling model preference for speed, from 0 to 1.
seedintegerDeterministic seed for pair ordering and IDs.
supports_json_modebooleanWhether the base OpenAI-compatible provider supports response_format JSON mode.
tintegerNumber of mutation generations (t=0 disables mutation rounds).

deepthonk.status DeepThonk Job Status

Read persisted job/run status from a run directory.

ParameterTypeDescription
job_idstringJob ID returned by deepthonk.start.
run_dirstringRun directory returned by deepthonk.start or deepthonk.run.

deepthonk.result DeepThonk Job Result

Return final summary/resource URIs when a background job is complete.

ParameterTypeDescription
job_idstringJob ID returned by deepthonk.start.
run_dirstringRun 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.

ParameterTypeDescription
job_idstringJob ID returned by deepthonk.start.
run_dirstringRun 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.

ParameterTypeDescription
run_dir *stringRun 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.

ParameterTypeDescription
fingerprint *stringExact fingerprint returned by deepthonk.lock_inspect.
run_dir *stringRun directory containing the lock to inspect.

deepthonk.repair_budget Repair Legacy Budget Config

Replace only legacy [redacted] numeric budget fields with explicit original values.

ParameterTypeDescription
replacements *object
run_dir *string

deepthonk.run Run DeepThonk

Run DeepThonk through the shared core engine.

ParameterTypeDescription
task *stringTask text to solve. MCP tools do not read task files.
api_key_envstringEnvironment variable that contains the API key.
base_urlstringOpenAI-compatible base URL, ending at /v1.
concurrencyobjectPer-phase concurrency overrides.
config_pathstringOptional DeepThonk YAML config path, such as ~/.config/deepthonk/config.yaml.
critique_limitsobjectCritique aggregation bounds.
finalizer_modelstringOptional model used to polish the winning candidate.
generator_modelstringModel used for initial candidate generation.
include_promptsbooleanStore rendered prompts in candidate/comparison metadata.
include_raw_model_outputsbooleanStore raw provider responses in trace metadata.
judge_modelstringModel used for pairwise judging.
judge_temperaturenumberTemperature for pairwise judging.
kintegerComparisons per candidate per mutation-generation round.
lambdanumberBradley-Terry L2 regularization. Defaults to 0.01.
mintegerComparisons per candidate in the final dense ranking round. Mutation count per generation is n - ceil(n/4), not m.
max_callsintegerMaximum logical model invocations, including failed calls and invalid-JSON retries; internal HTTP retries are reported separately.
max_input_tokensintegerMaximum recorded input tokens before the run stops at a phase boundary.
max_output_tokensintegerMaximum recorded output tokens before the run stops at a phase boundary.
max_usdnumberMaximum estimated USD spend; requires matching budget.prices in config.
model_output_tokensobjectPer-role model output token caps.
mutate_temperaturenumberTemperature for critique-guided mutation.
mutator_modelstringModel used for critique-guided mutation.
nintegerPopulation size override. Defaults to the profile's n.
profilestringRun profile. quick is safest for smoke tests; paper plans 285 calls.
profile_namestringSaved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path.
prompt_stylestringPrompt template style. Defaults to paper-programming for the paper profile, general otherwise.
promptsobjectOptional per-phase prompt template overrides. Templates use {task}, {rubric}, {candidate}, {candidateA}, {candidateB}, {critique} placeholders. Use {{ and }} to escape literal braces. See docs/customi…
providerstringProvider label. Built-ins include fake, deepseek, openrouter, and openai-compatible; custom labels require base_url.
provider_max_concurrencyintegerProcess-shared maximum concurrent calls to this provider route.
rankobjectFinal ranking mode, degree, seed, and logical-call limit.
request_timeout_msintegerLogical provider-call deadline in milliseconds, including body reads and retry waits.
rubricstringOptional judging rubric text.
run_dirstringDirectory for trace files.
run_idstringOptional stable caller-supplied run ID.
sample_temperaturenumberTemperature for initial candidate generation.
sampling_cost_prioritynumberMCP Sampling model preference for lower cost, from 0 to 1.
sampling_intelligence_prioritynumberMCP Sampling model preference for intelligence, from 0 to 1.
sampling_model_hintsarrayOptional MCP Sampling model hints. Hints guide host model choice but do not enforce it.
sampling_speed_prioritynumberMCP Sampling model preference for speed, from 0 to 1.
seedintegerDeterministic seed for pair ordering and IDs.
supports_json_modebooleanWhether the base OpenAI-compatible provider supports response_format JSON mode.
tintegerNumber of mutation generations (t=0 disables mutation rounds).

deepthonk.rank Rank Candidates

Rank supplied candidates with pairwise judging and Bradley-Terry aggregation.

ParameterTypeDescription
candidates *arrayCandidate texts or {id, content} objects.
task *stringTask text the candidates answer.
api_key_envstringEnvironment variable that contains the API key.
base_urlstringOpenAI-compatible base URL, ending at /v1.
concurrencyintegerMaximum concurrent pairwise comparisons.
config_pathstringOptional DeepThonk YAML config path.
finalizer_modelstringOptional model used to polish the winning candidate.
generator_modelstringModel used for initial candidate generation.
judge_modelstringModel used for pairwise judging.
judge_temperaturenumberTemperature for pairwise judging.
lambdanumberBradley-Terry L2 regularization.
model_output_tokensobjectPer-role model output token caps for one-shot operations.
mutator_modelstringModel used for critique-guided mutation.
profilestringProfile used for one-shot defaults.
profile_namestringSaved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path.
prompt_stylestring
promptsobject
providerstringProvider label. Built-ins include fake, deepseek, openrouter, and openai-compatible; custom labels require base_url.
provider_max_concurrencyintegerProcess-shared maximum concurrent calls to this provider route.
rankobjectPair scheduling mode, degree, seed, and logical-call limit.
request_timeout_msintegerLogical provider-call deadline in milliseconds.
rubricstringOptional judging rubric text.
sampling_cost_prioritynumberMCP Sampling model preference for lower cost, from 0 to 1.
sampling_intelligence_prioritynumberMCP Sampling model preference for intelligence, from 0 to 1.
sampling_model_hintsarrayOptional MCP Sampling model hints.
sampling_speed_prioritynumberMCP Sampling model preference for speed, from 0 to 1.
supports_json_modebooleanWhether the base OpenAI-compatible provider supports response_format JSON mode.

deepthonk.mutate Mutate Candidate

Mutate one supplied candidate with critique.

ParameterTypeDescription
candidate *stringCandidate text to mutate.
task *stringTask text the candidate answers.
api_key_envstringEnvironment variable that contains the API key.
base_urlstringOpenAI-compatible base URL, ending at /v1.
config_pathstringOptional DeepThonk YAML config path.
critiquestringCritique or guidance for mutation.
finalizer_modelstringOptional model used to polish the winning candidate.
generator_modelstringModel used for initial candidate generation.
judge_modelstringModel used for pairwise judging.
model_output_tokensobjectPer-role model output token caps for one-shot operations.
mutate_temperaturenumberTemperature for mutation.
mutator_modelstringModel used for critique-guided mutation.
profilestringProfile used for one-shot defaults.
profile_namestringSaved profile bundle name; loads ~/.config/deepthonk/profiles/<name>.yaml. Mutually exclusive with config_path.
prompt_stylestring
promptsobject
providerstringProvider label. Built-ins include fake, deepseek, openrouter, and openai-compatible; custom labels require base_url.
provider_max_concurrencyintegerProcess-shared maximum concurrent calls to this provider route.
request_timeout_msintegerLogical provider-call deadline in milliseconds.
rubricstringOptional rubric text.
sampling_cost_prioritynumberMCP Sampling model preference for lower cost, from 0 to 1.
sampling_intelligence_prioritynumberMCP Sampling model preference for intelligence, from 0 to 1.
sampling_model_hintsarrayOptional MCP Sampling model hints.
sampling_speed_prioritynumberMCP Sampling model preference for speed, from 0 to 1.
supports_json_modebooleanWhether 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.

ParameterTypeDescription
run_dir *string
continueboolean

deepthonk.export Export Run

Export a run summary or trace.

ParameterTypeDescription
run_dir *string
formatstring

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.

ParameterTypeDescription
name *string

deepthonk.profile_save Save DeepThonk Profile

Save a reusable named profile bundle.

ParameterTypeDescription
name *string
algorithmobject
api_key_envstring
base_urlstring
budget
concurrency
forceboolean
modelsobject
output
profilestring
prompt_stylestring
promptsobject
providerstring
providersobject
retry

deepthonk.profile_delete Delete DeepThonk Profile

Delete a saved named profile.

ParameterTypeDescription
name *string