Content-Length: 241953 | pFad | http://github.com/stacklok/codegate/pull/1304

31 Fix Anthropic FIM with muxing. by blkt · Pull Request #1304 · stacklok/codegate · GitHub
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

Fix Anthropic FIM with muxing. #1304

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Fix Anthropic FIM with muxing. #1304

merged 1 commit into from
Mar 25, 2025

Conversation

blkt
Copy link
Contributor

@blkt blkt commented Mar 22, 2025

In the context of muxing, the code determining which mapper to use when receiving requests to be routed towards Anthropic was relying in is_fim_request only, and was not taking into account if the actual endpoint receiving the request was the legacy one (i.e. /completions) or the current one (i.e. /chat/completions). This caused the use of the wrong mapper, which led to an empty text content for the FIM request.

A better way to determine which mapper to use is looking at the effective type, since that's the real source of truth for the translation.

In the context of muxing, the code determining which mapper to use
when receiving requests to be routed towards Anthropic was relying in
`is_fim_request` only, and was not taking into account if the actual
endpoint receiving the request was the legacy one
(i.e. `/completions`) or the current one
(i.e. `/chat/completions`). This caused the use of the wrong mapper,
which led to an empty text content for the FIM request.

A better way to determine which mapper to use is looking at the
effective type, since that's the real source of truth for the
translation.
@blkt blkt self-assigned this Mar 22, 2025
@blkt
Copy link
Contributor Author

blkt commented Mar 24, 2025

OK, a re-run of Anthropic integration tests was successful.

@blkt blkt merged commit a988738 into main Mar 25, 2025
8 of 11 checks passed
@blkt blkt deleted the fix/fix-anthropic-fim-muxing branch March 25, 2025 06:29
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.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/stacklok/codegate/pull/1304

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy