Skip to content

Conversation

petarjuki7
Copy link
Contributor

Summary

Fixes #4089 - Removes duplicate "content-type" header in HTTP requests to embedding API endpoints.

Problem

When sending requests to model API endpoints, the "content-type" header was being set twice:

  1. Automatically by reqwest's .json() method
  2. Explicitly via .header("content-type", "application/json")

Solution

Removed the explicit .header("content-type", "application/json") call from the request builder in /crates/http-api-bindings/src/embedding/openai.rs.

Testing

  • Manually verified HTTP request headers no longer contain duplicate content-type entries

@wsxiaoys wsxiaoys requested a review from zwpaper May 26, 2025 01:34
@wsxiaoys wsxiaoys merged commit d2ee88b into TabbyML:main May 28, 2025
3 of 5 checks passed
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.

repeated "content-type" in headers when send https request to models api
2 participants