Skip to content

Commit

Permalink
Apparently tools are no longer in beta
Browse files Browse the repository at this point in the history
Leaving this in actually broke this header:
    anthropic-beta: max-tokens-3-5-sonnet-2024-07-15

I think what's going on is that the server's HTTP implementation doesn't
support duplicate HTTP headers, but the HTTP spec does. It's likely that
they use a String => String mapping for headers, which isn't correct but
is surprisingly common. Unfortunately, the implication is that you can
only enable one beta feature at a time.
  • Loading branch information
jgaskins committed Aug 10, 2024
1 parent 22c9758 commit 0d13729
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/messages.cr
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ module Anthropic

headers = HTTP::Headers.new

# Tools are apparently in beta as of this writing.
if tools.try(&.any?)
headers.add "anthropic-beta", "tools-2024-05-16"
end

# 3.5 Sonnet only supports 4k tokens by default, but you can opt into
# up to 8k output tokens.
# https://x.com/alexalbert__/status/1812921642143900036
Expand Down

0 comments on commit 0d13729

Please sign in to comment.