Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion riddle/src/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,14 @@ impl HttpOracle {
// Sent as "reasoning_effort" only when set: reasoning models accept it
// ("low" ≈ faster first ink), but some providers reject the field on
// non-reasoning models, so it must stay out of the default request.
let reasoning = std::env::var("RIDDLE_OPENAI_REASONING").ok();
// Set-but-EMPTY also means unset: config UIs writing env files (e.g.
// remagic's settings form, whose select includes a "" option) produce
// RIDDLE_OPENAI_REASONING= — and sending "reasoning_effort":"" is a
// 400 on OpenAI, silently killing every turn.
let reasoning = std::env::var("RIDDLE_OPENAI_REASONING")
.ok()
.map(|s| s.trim().to_string())
.filter(|s| !s.is_empty());
eprintln!(
"riddle: http oracle base={base} model={model} max_tokens={max_tokens} reasoning={}",
reasoning.as_deref().unwrap_or("-")
Expand Down