Skip to content

Commit

Permalink
fix: add anthropic version header (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
CahidArda authored Dec 20, 2024
1 parent 02394bb commit 8a9df0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/client/api/llm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ describe("llm", () => {
headers: {
authorization: `Bearer ${qstashToken}`,
"upstash-forward-x-api-key": llmToken,
"upstash-forward-anthropic-version": "2023-06-01",
"upstash-callback": callback,
"upstash-method": "POST",
"content-type": "application/json",
Expand Down
4 changes: 4 additions & 0 deletions src/client/api/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export class LLMProvider<TOwner extends LLMOwner> extends BaseProvider<"llm", LL
headers["OpenAI-Organization"] = this.organization;
}

if (this.owner === "anthropic") {
headers["anthropic-version"] = "2023-06-01";
}

return headers;
}

Expand Down

0 comments on commit 8a9df0d

Please sign in to comment.