Skip to content

fix(python): honor classifier spec option overrides - #264

Open
joo00der (jihtsan) wants to merge 1 commit into
braintrustdata:mainfrom
jihtsan:codex/262-honor-spec-option-overrides
Open

joo00der (jihtsan) wants to merge 1 commit into
braintrustdata:mainfrom
jihtsan:codex/262-honor-spec-option-overrides

Conversation

@jihtsan

Copy link
Copy Markdown

Change

Fixes #262. Merge saved spec options with explicit kwargs before the existing single classifier constructor call, giving explicit kwargs precedence. This fixes duplicate-keyword TypeError in from_spec/from_spec_file without changing constructor validation/defaults, token clamping, prompts, cache policy or unrelated thread rendering.

Seven original-code regressions fail before repair and pass after it. Cover model/engine, use_cot=False, temperature=0, token options includingNone, saved defaults/client/render options, spec immutability and real temporary YAML loading with cache cleanup. Independent Standards/Spec reviews on434acc303ea3b95a1cef45ea9c4c13212a8fd690 have no remaining findings. This Python-only loader has no matching TypeScript API to modify.

Validation

  • Seven public constructor/YAML regressions pass; broader filtered offline Python66passed/31deselected.
  • Full repository precommit hooks, Pythonwheel/sdistbuild and twine metadata checks pass.
  • The same-base broader-suite attempt for JSONDiff treats an absent object member as equal to an explicit null #261 recorded16 dummy-key provider authentication failures and8 missingoptionalLiteLLM failures. These tests were excluded here; the24 deselection prefixes also match7additionaltests. Actual31deselections are explicit, not a full-suite success claim. Finalfilteredrun blocksallTCP/connect_ex and clears proxies.

Validated locally with Python3.13.12/uv.lock dev+scipy. Hosted CI, real-provider/model success and other runtime/platform matrices are unverified. No real keys or paid quota were used; full-suite success is not claimed. Maintainers own approval/merge/release.

AI assistance: OpenAI Codex researched, implemented and independently reviewed this change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T07:55:12.879465Z 434acc3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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.

LLMClassifier.from_spec raises duplicate-keyword errors for explicit saved-option overrides

1 participant