Skip to content

Tests: update two contract tests that #16953 and #16927 left red on main - #17040

Merged
danielhanchen merged 1 commit into
mainfrom
ci/main-red-provider-and-batch-contract
Nov 7, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/main-red-provider-and-batch-contract

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Two tests have been red on main since this morning's merges. Every PR based on main now inherits them: #17010, which changes only the Windows bash tool, fails both. Both reproduce on main locally:

(Python 3.13, a-f)  studio/backend/tests/test_custom_provider_api_type.py::test_base_url_query_survives_native_provider_calls
    At index 0 diff: ('/v1/models/claude-sonnet-4-5', 'tenant=a') != ('/v1/messages', 'tenant=a')

Repo tests (CPU, studio)  tests/studio/test_model_picker_contracts.py::test_batch_sizes_reach_an_api_load_through_the_server_mirror
    assert 'strip_batch = "n_batch" in kwargs,' in '...openai_auto_switch_settings.py...'

In both cases the product change is correct and the test is out of date.

Change

Tests only:

  • test_base_url_query_survives_native_provider_calls expects the output-cap lookup first, with its query string kept. It also empties _anthropic_output_caps first, so the lookup happens whatever ran earlier in the worker. That cache is module-global, and with an entry already cached the request list would change with test order.
  • test_batch_sizes_reach_an_api_load_through_the_server_mirror stops grepping that line. It calls the real model_override_load_kwargs, imported the same way as the lookup-ladder helper already in that file:
    • a stored -b is dropped when the override has n_batch;
    • a stored -ub is dropped when the override has n_ubatch;
    • both stay when neither field is set.

Testing

main this branch
test_custom_provider_api_type.py + test_anthropic_default_max_tokens.py 1 failed 29 passed, in either file order
tests/studio/test_model_picker_contracts.py 1 failed 203 passed
the batch test with strip_batch = False planted in strip_args_shadowed_by fails

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T16:14:46.929018Z 00b2ab9 Manual request
ℹ️ 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" or "@codex security review".

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

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 00b2ab911d

ℹ️ 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".

@danielhanchen
danielhanchen merged commit c8f0ad1 into main Nov 7, 2026
@danielhanchen
danielhanchen deleted the ci/main-red-provider-and-batch-contract branch November 7, 2026 16:20
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