Skip to content

feat(anthropic): dynamic mapping of Max Tokens for Anthropic #31946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Aug 15, 2025

Conversation

keenborder786
Copy link
Contributor

@keenborder786 keenborder786 commented Jul 10, 2025

@ccurme

Copy link

vercel bot commented Jul 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
langchain Ignored Ignored Preview Aug 15, 2025 6:15pm

Copy link

codspeed-hq bot commented Jul 10, 2025

CodSpeed WallTime Performance Report

Merging #31946 will not alter performance

Comparing keenborder786:feat/anthropic_max_tokens (69ab335) with wip-v1.0 (9721684)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched benchmarks

Copy link

codspeed-hq bot commented Jul 10, 2025

CodSpeed Instrumentation Performance Report

Merging #31946 will not alter performance

Comparing keenborder786:feat/anthropic_max_tokens (69ab335) with wip-v1.0 (9721684)

Summary

✅ 14 untouched benchmarks

@keenborder786 keenborder786 changed the title [Chore]: Dynamic Mapping of Max Tokens for Anthropic chore: Dynamic Mapping of Max Tokens for Anthropic Jul 11, 2025
@keenborder786 keenborder786 changed the title chore: Dynamic Mapping of Max Tokens for Anthropic chore: dynamic mapping of Max Tokens for Anthropic Jul 11, 2025
@keenborder786
Copy link
Contributor Author

@ccurme

2 similar comments
@keenborder786
Copy link
Contributor Author

@ccurme

@keenborder786
Copy link
Contributor Author

@ccurme

@mdrxy mdrxy changed the title chore: dynamic mapping of Max Tokens for Anthropic feat(anthropic): dynamic mapping of Max Tokens for Anthropic Jul 16, 2025
Copy link
Collaborator

@mdrxy mdrxy left a comment

Choose a reason for hiding this comment

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

I think this seems like a fair compromise, but I'll defer to @ccurme to merge this when he's back in the office next week.

@keenborder786
Copy link
Contributor Author

@ccurme

1 similar comment
@keenborder786
Copy link
Contributor Author

@ccurme

@keenborder786
Copy link
Contributor Author

keenborder786 commented Jul 26, 2025

@ccurme, please let me know if I need to make any changes.

@keenborder786
Copy link
Contributor Author

@efriis

@mdrxy mdrxy added the integration Related to a provider partner package integration label Jul 28, 2025
@keenborder786
Copy link
Contributor Author

@mdrxy

2 similar comments
@keenborder786
Copy link
Contributor Author

@mdrxy

@keenborder786
Copy link
Contributor Author

@mdrxy

@keenborder786
Copy link
Contributor Author

@ccurme can you please review it.

@keenborder786
Copy link
Contributor Author

keenborder786 commented Jul 31, 2025

@mdrxy @ccurme, please let me know if I have to make any changes, otherwise this is good to go...

@keenborder786
Copy link
Contributor Author

@mdrxy please let me know if any changes needs to be made.

@keenborder786
Copy link
Contributor Author

@mdrxy

@casparb casparb force-pushed the feat/anthropic_max_tokens branch from 139b5f5 to 59c18d9 Compare August 14, 2025 17:58
@casparb casparb changed the base branch from master to wip-v1.0 August 14, 2025 18:05
@casparb casparb requested a review from eyurtsev as a code owner August 14, 2025 18:05
Copy link
Collaborator

@mdrxy mdrxy left a comment

Choose a reason for hiding this comment

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

LGTM

@mdrxy mdrxy added this to the v1 milestone Aug 14, 2025
Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

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

Looks great.

I think we need to update other cassettes in the same way. There are some that are part of integration tests, so wouldn't run as part of CI for PRs. They would run as part of release pipeline (and block release).

See tests marked for VCR here.

@casparb casparb merged commit 174e685 into langchain-ai:wip-v1.0 Aug 15, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Related to a provider partner package integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature[anthropic]: dynamically set max_tokens
4 participants