Update endpoint URL construction in handler.py

This commit is contained in:
Sunny 2026-07-03 18:24:15 +08:00 • committed by GitHub
parent 4565df6639
commit 561d84e40f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,7 +67,7 @@ class AnthropicCountTokensHandler(AnthropicCountTokensConfig):
verbose_logger.debug(f"Transformed request: {request_body}")
# Get endpoint URL
endpoint_url = api_base or self.get_anthropic_count_tokens_endpoint()
endpoint_url = f"{api_base}/v1/messages/count_tokens" if api_base else self.get_anthropic_count_tokens_endpoint()
verbose_logger.debug(f"Making request to: {endpoint_url}")