Content-Length: 238840 | pFad | http://github.com/Kong/kong/pull/13694

61 fix(llm): fixes code must be a number error by t-yuki · Pull Request #13694 · Kong/kong · 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(llm): fixes code must be a number error #13694

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

t-yuki
Copy link

@t-yuki t-yuki commented Sep 19, 2024

Summary

When I tried to use ai-proxy multimodal input with azure provider, I got a 500 error with a log like:

[error] 147#0: *5356 [kong] init.lua:427 [ai-proxy] /usr/local/share/lua/5.1/kong/llm/proxy/handler.lua:458: code must be a number, client: 172.18.0.5, server: kong, request: "POST /test8-3-ai-proxy-gpt4o

I have just recognized the azure provider doesn't support multimodal input yet (well, actually, AOAI supports multimodal input after api-version 2024-06-01).

However, I found that the error handling path is broken and it raises unexpected errors.

This change is to fix to return 400 error properly for multimodal input with unsupported providers.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]

@team-gateway-bot team-gateway-bot added the author/community PRs from the open-source community (not Kong Inc) label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author/community PRs from the open-source community (not Kong Inc) cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee plugins/ai-proxy plugins/ai-request-transformer plugins/ai-response-transformer size/XS
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/Kong/kong/pull/13694

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy