Skip to content

fix: coerce config bools/numerics, remove thinking_budget keys, trim wizard, add extra_request_params - #41

Merged
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
hygiene-wave/config-coercion-sweep
Aug 29, 2026
Merged

fix: coerce config bools/numerics, remove thinking_budget keys, trim wizard, add extra_request_params#41
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
hygiene-wave/config-coercion-sweep

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

Family hygiene wave: bool/numeric coercion (warn-and-default), removed thinking_budget_tokens/thinking_budget_buffer (artificial max_output_tokens floor), unknown-key sweep with targeted ghost-key messages (debug/raw_debug/debug_truncate_length/thinking_budget_*), removed dead DEFAULT_DEBUG_TRUNCATE_LENGTH constant, trimmed wizard to base_url/api_key/context_window (stream_idle_timeout + max_output_tokens remain settings-only), max_tokens NOT renamed, extra_request_params merged last into both the main and auto-continuation request builds. 318 passed, 1 pre-existing network-dependent failure (confirmed on main). 🤖 Generated with Amplifier

…wizard, add extra_request_params

- Add _coerce_bool/_coerce_int/_coerce_float helpers (warn-and-default,
  never crash) and apply to enable_state, raw, use_streaming, retry_jitter,
  max_tokens, timeout, context_window, max_output_tokens, stream_idle_timeout,
  priority, max_retries, min_retry_delay, max_retry_delay.
- Remove thinking_budget_tokens/thinking_budget_buffer: they forced an
  artificial max_output_tokens floor that fought the server's own limits.
  extended_thinking still forces reasoning effort but no longer adjusts
  max_output_tokens; targeted messages point at setting max_output_tokens
  directly.
- Add mount-time unknown-config-key sweep with difflib did-you-mean
  suggestions and targeted messages for ghost keys (debug, raw_debug,
  debug_truncate_length, thinking_budget_tokens, thinking_budget_buffer).
- Remove the dead DEFAULT_DEBUG_TRUNCATE_LENGTH constant and the
  debug/raw_debug/debug_truncate_length README rows -- never wired.
- Trim the setup wizard to base_url, api_key, context_window.
  stream_idle_timeout and max_output_tokens remain fully supported config
  keys, just settings-only now. max_tokens is NOT renamed (kept distinct
  from max_output_tokens; documented clearly instead).
- Add extra_request_params, merged last into both the main request build
  and the auto-continuation build.

Tests: tests/test_config_hygiene.py adds fail-before/pass-after coverage.
Updated tests/test_context_limits.py and tests/test_stream_idle_timeout.py
for the wizard trim (fields intentionally removed, not broken). Full
suite: 318 passed, 1 pre-existing failure (test_list_models_returns_list
requires network egress, fails identically on main at 37c6337).

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@bkrabach

Copy link
Copy Markdown
Collaborator Author

Merging via maintainer admin override: self-authored PR (mechanical hygiene-wave fix, admin-at-user-direction), CI green, squash merge, branch retained.

@bkrabach
Brian Krabach (bkrabach) merged commit 30d6106 into main Aug 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants