Skip to content

Conversation

OskarStark
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
Docs? no
Issues Follows #667
License MIT

@carsonbot carsonbot added Feature New feature Platform Issues & PRs about the AI Platform component labels Sep 24, 2025
@OskarStark OskarStark self-assigned this Sep 24, 2025
Only add max_tokens => 1000 if not already present in options.
Preserve existing max_tokens values when provided.
Add test coverage for the max_tokens handling logic.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies the Claude constructor to handle max_tokens parameter more flexibly by setting a default value internally rather than in the constructor parameter.

  • Changed constructor default parameter from ['max_tokens' => 1000] to empty array
  • Added internal logic to set max_tokens to 1000 if not provided in options
  • Added comprehensive test coverage for the new behavior

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/platform/src/Bridge/Anthropic/Claude.php Modified constructor to conditionally set max_tokens default internally
src/platform/tests/Bridge/Anthropic/ClaudeTest.php Added test cases covering default, custom with max_tokens, and custom without max_tokens scenarios

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@OskarStark OskarStark merged commit 30c655a into symfony:main Sep 24, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature Platform Issues & PRs about the AI Platform component Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants