Skip to content

Conversation

@paxiaatucsdedu
Copy link
Member

Summary

Adds a user-friendly warning when OpenAI models are used with max_tokens instead of the required max_completion_tokens parameter.

Problems

Users were confused by backend error messages when using max_tokens with OpenAI models. The backend error mentioned maxCompletionTokens (camelCase), but Python requires max_completion_tokens (snake_case).
See #41

Changes

  1. Detects when model_id starts with "openai." and max_tokens is specified
    Displays clear warning: "OpenAI models require 'max_completion_tokens' instead of 'max_tokens'."
  2. Updated README.md

Tests

Tested on all the OpenAI models mentioned in the issue #41
test-temp.ipynb

Add instructions for token limit parameters fro OpenAI models
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 21, 2025
@YouNeedCryDear YouNeedCryDear self-requested a review October 27, 2025 18:21
Upgrade oci dependency from >=2.144.0 to >=2.161.0
@YouNeedCryDear YouNeedCryDear merged commit 8151628 into oracle:main Oct 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants