Skip to content

Conversation

@roerohan
Copy link
Contributor

What does this PR do?

Passes the max_completion_tokens parameter instead of max_tokens parameter in Cloudflare AI Gateway.

How did you verify your code works?

Before:

image

After:

image

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on the search results, here are the potentially related PRs:

  1. PR #6534: Handle Cloudflare AI Gateway responses for codex models

    • Directly related to Cloudflare AI Gateway handling - may already address similar parameter issues
  2. PR #5541: fix: use max_completion_tokens for Azure reasoning models

    • Addresses the same max_completion_tokens vs max_tokens parameter issue but for Azure reasoning models - similar pattern of fix
  3. PR #5036: Fix/cerebras conservative max tokens

    • Related to max tokens handling for another provider (Cerebras) - similar type of token limit fix

These PRs may have already addressed similar parameter mapping issues for different providers. You should check if PR #6534 in particular already handles Cloudflare AI Gateway parameters, as it seems directly relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant