Skip to content

fix(chat): replace retired gpt-3.5-turbo default model in create_chat_completion - #1299

Open
pcbeingused33 wants to merge 1 commit into
meilisearch:mainfrom
pcbeingused33:fix/chat-completion-default-model
Open

pcbeingused33 wants to merge 1 commit into
meilisearch:mainfrom
pcbeingused33:fix/chat-completion-default-model

Conversation

@pcbeingused33

@pcbeingused33 pcbeingused33 commented Oct 31, 2026 •

Copy link
Copy Markdown

MeilisearchClient.create_chat_completion defaults model="gpt-3.5-turbo", which is sent to the workspace's LLM provider when the caller omits model. OpenAI retired gpt-3.5-turbo on 2026-10-23 and lists gpt-5.6-terra as its replacement (https://developers.openai.com/api/docs/deprecations), so a call that relies on the default now fails against OpenAI-backed workspaces.

This changes the default to gpt-5.6-terra and updates the one test asserting the default request body. The model remains overridable per call and should correspond to the LLM configured in the workspace settings, as the docstring already says. If you would rather not hard-code a vendor model at all (for example make model required), happy to change it that way.

Test: tests/client/test_chat_completions.py::test_create_chat_completion_basic_stream (fails against main with gpt-3.5-turbo; the 6 tests of the file pass with the change, run against a local Meilisearch container).

AI usage (per CONTRIBUTING): this PR was prepared with AI assistance (Claude).

Summary by CodeRabbit

  • Changes
    • Chat completions now use gpt-5.6-terra by default.

…_completion

OpenAI shut gpt-3.5-turbo down on 2026-10-23 (replacement: gpt-5.6-terra); the default is forwarded to the workspace's LLM provider, so calls omitting model failed.
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d759ddf6-61c2-4cc4-856d-66bca151ca1c
Commits

Reviewing files that changed from the base of the PR and between 6a6cc25 and a447768.

Files selected for processing: 2
  • meilisearch/client.py
  • tests/client/test_chat_completions.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

Client.create_chat_completion now defaults to gpt-5.6-terra. The streaming chat-completion test expects the same model.

Changes: Chat completion default model

Layer / File(s) Summary
Update default model and test expectation
meilisearch/client.py, tests/client/test_chat_completions.py
The method’s default model and the streaming test’s expected request model change to gpt-5.6-terra. Other parameters and streaming behavior are unchanged.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: eazyal

Merge Risk: Minimal · up to a4477

The default model and its test expectation are consistent, and callers can still override the model. No actionable merge-blocking issue is established; the change is mergeable subject to normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the default model in create_chat_completion moves from the retired gpt-3.5-turbo to gpt-5.6-terra. It is specific and matches the summary, the signature change, and th…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the default model in create_chat_completion moves from the retired gpt-3.5-turbo to gpt-5.6-terra. It is specific and matches the summary, the signature change, and the test update. The fix(chat) prefix is a conventional commit type and does not affect the result.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@pcbeingused33

Copy link
Copy Markdown
Author

Friendly ping in case this slipped through — happy to adjust anything (scope, tests, style) if that makes review easier. Thanks for maintaining this!

@pcbeingused33

Copy link
Copy Markdown
Author

Friendly ping: could someone take a look at this when there's time? Happy to adjust or rebase anything. Thanks!

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.

1 participant