Skip to content
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

Enable ALPN feature in reqwest crate #1318

Merged
merged 1 commit into from
Jan 11, 2025
Merged

Conversation

antoniosarosi
Copy link
Contributor

@antoniosarosi antoniosarosi commented Jan 11, 2025

Google AI returns a confusing HTTP 400 error with message INVALID_ARGUMENT if the ALPN negotiation is not supported by the client:

[
  {
    "error": {
      "code": 400,
      "message": "Request contains an invalid argument.",
      "status": "INVALID_ARGUMENT"
    }
  }
]

This PR enables the native-tls-alpn feature for the reqwest crate which handles the ALPN extension for TLS.


Important

Enable ALPN support in reqwest to fix HTTP 400 errors from Google AI by updating dependencies and enabling native-tls-alpn.

  • Behavior:
    • Enable native-tls-alpn feature in reqwest crate to support ALPN negotiation, resolving HTTP 400 errors from Google AI.
    • Update reqwest version to 0.12.12 in Cargo.toml and baml-runtime/Cargo.toml.
  • Dependencies:
    • Update bytes to 1.9.0, hyper-util to 0.1.10, and openssl-src to 300.4.1+3.4.0 in Cargo.lock.
    • Add windows-registry and tower 0.5.2 dependencies in Cargo.lock.

This description was created by Ellipsis for b1b32c0. It will automatically update as commits are pushed.

Copy link

vercel bot commented Jan 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baml ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 11:27pm

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to b1b32c0 in 1 minute and 19 seconds

More details
  • Looked at 318 lines of code in 5 files
  • Skipped 1 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. engine/baml-runtime/src/internal/llm_client/traits/mod.rs:150
  • Draft comment:
    The single_call function implementation is redundant because it duplicates the logic already present in the WithSingleCallable trait implementation for all types that implement WithClient, WithChat, WithCompletion, and WithClientProperties. Consider removing this implementation to avoid redundancy.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_mneY1452QH84G9bS


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@antoniosarosi antoniosarosi added this pull request to the merge queue Jan 11, 2025
Merged via the queue into canary with commit 1ea1d8b Jan 11, 2025
11 checks passed
@antoniosarosi antoniosarosi deleted the antonio/google-ai-bug branch January 11, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant