Skip to content

feat(scorers): validate model parameters - #308

Open
Cedric / ViaDézo1er (viadezo1er) wants to merge 4 commits into
mainfrom
cedric/scorers-validate-model-parameters
Open

feat(scorers): validate model parameters#308
Cedric / ViaDézo1er (viadezo1er) wants to merge 4 commits into
mainfrom
cedric/scorers-validate-model-parameters

Conversation

@viadezo1er

@viadezo1er Cedric / ViaDézo1er (viadezo1er) commented Aug 14, 2026

Copy link
Copy Markdown
Contributor
❯ bt scorers create test-invalid-top-k-scorer \
     --slug test-invalid-top-k-scorer \
     --model gpt-4.1 \
     --top-k 10 \
     --messages '[{"role":"user","content":"Return A or B."}]' \
     --choice-scores '{"A":1,"B":0}' \
     --if-exists replace \
     --no-input \
     --json

{"error":{"message":"prompt_data.options.params.top_k: Model parameter \"top_k\" is not supported by model format \"openai\"; suggestion: remove this parameter"}}

AI Summary

Validate LLM scorer definitions through Braintrust as part of creating them.

  • send the complete candidate scorer once to POST /insert-functions
  • parse structured 422 validation reports and show actionable parameter errors and backend normalization suggestions
  • leave model capability, parameter range, and unsupported-parameter checks authoritative on the backend
  • support top_k, reasoning enablement, and reasoning budgets in scorer model configuration
  • preserve structured provider authentication errors while classifying them as user errors
  • reject - input sources on an interactive terminal instead of waiting for EOF

Behavior

bt scorers create uses the existing insertion request for both validation and creation. Invalid definitions fail with the user-error exit code and are not written. With --json, errors retain a stable JSON envelope and provider response details.

Related

Backend support: https://github.com/braintrustdata/braintrust/pull/18155

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Latest downloadable build artifacts for this PR commit 80037f75c1b7:

Available artifact names
  • artifacts-build-global
  • artifacts-build-local-x86_64-apple-darwin
  • artifacts-build-local-aarch64-pc-windows-msvc
  • artifacts-build-local-x86_64-pc-windows-msvc
  • artifacts-build-local-x86_64-unknown-linux-musl
  • artifacts-build-local-x86_64-unknown-linux-gnu
  • artifacts-build-local-aarch64-unknown-linux-gnu
  • artifacts-build-local-aarch64-apple-darwin
  • artifacts-plan-dist-manifest
  • cargo-dist-cache

@viadezo1er
Cedric / ViaDézo1er (viadezo1er) force-pushed the cedric/scorers-validate-model-parameters branch from 3c04afd to 89fac1e Compare August 14, 2026 20:15
@viadezo1er
Cedric / ViaDézo1er (viadezo1er) force-pushed the cedric/scorers-validate-model-parameters branch from 89fac1e to 3639e73 Compare August 14, 2026 21:30
@viadezo1er
Cedric / ViaDézo1er (viadezo1er) force-pushed the cedric/scorers-validate-model-parameters branch 6 times, most recently from fc892d8 to 4d393b3 Compare August 18, 2026 02:17
@viadezo1er
Cedric / ViaDézo1er (viadezo1er) force-pushed the cedric/scorers-validate-model-parameters branch 2 times, most recently from 4dba7ec to cfd98db Compare August 19, 2026 00:08
@viadezo1er
Cedric / ViaDézo1er (viadezo1er) force-pushed the cedric/scorers-validate-model-parameters branch from cfd98db to 3ad4a13 Compare August 19, 2026 00:40
Base automatically changed from cedric/scorers-create to main August 19, 2026 00:55
@viadezo1er
Cedric / ViaDézo1er (viadezo1er) force-pushed the cedric/scorers-validate-model-parameters branch 2 times, most recently from 1c94601 to 21447b9 Compare August 19, 2026 01:13
@viadezo1er
Cedric / ViaDézo1er (viadezo1er) marked this pull request as ready for review August 19, 2026 01:59
chatgpt-codex-connector[bot]

This comment was marked as outdated.

@viadezo1er
Cedric / ViaDézo1er (viadezo1er) force-pushed the cedric/scorers-validate-model-parameters branch 2 times, most recently from 94073ab to 69b2754 Compare August 21, 2026 01:43
@viadezo1er
Cedric / ViaDézo1er (viadezo1er) force-pushed the cedric/scorers-validate-model-parameters branch from 69b2754 to 80037f7 Compare August 21, 2026 18:52
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.

1 participant