Skip to content

fix: use eval config model in job id#738

Open
xeophon wants to merge 1 commit into
mainfrom
fix/eval-config-job-model
Open

fix: use eval config model in job id#738
xeophon wants to merge 1 commit into
mainfrom
fix/eval-config-job-model

Conversation

@xeophon

@xeophon xeophon commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

when you don't specify the model name in the CLI (but rather in the TOML), the prime CLI used the DEFAULT_MODEL (gpt-4.1 mini) instead of the TOML value. this fixes it


Note

Low Risk
Small, localized change to job id metadata for config evals; no auth, billing, or inference routing changes.

Overview
For config-driven eval runs (TOML with [[eval]] entries), the X-PI-Job-Id header now uses the top-level model from that config when building the job id, instead of always using the default/CLI-resolved model from _add_default_inference_and_key_args.

An explicit --model / -m on the original passthrough args still wins; the TOML model is only applied when that override is absent.

Reviewed by Cursor Bugbot for commit d1f95f4. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d1f95f43ac

ℹ️ About Codex in GitHub

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

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if job_target is None:
job_target = Path(environment).stem
if config_envs and _parse_value_option(passthrough_args, "--model", "-m") is None:
model = toml.load(environment).get("model") or model

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate the TOML model type before building the job id

For config-driven runs where the TOML has at least one [[eval]] entry and no CLI --model, this assigns any truthy model value directly into model; if the user has a malformed but parseable config such as model = 123 or a table, _build_job_id() immediately calls .replace() on a non-string and the CLI crashes before verifiers can report the configuration error. Please only accept a non-empty string here, otherwise fall back or raise a clear typer.Exit validation message.

Useful? React with 👍 / 👎.

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