Skip to content

docs(ai-gateway): add LangChain and Vercel AI SDK cookbooks - #6520

Open
tejakummarikuntla wants to merge 1 commit into
Kong:mainfrom
tejakummarikuntla:docs/langchain-vercel-ai-sdk-cookbooks
Open

docs(ai-gateway): add LangChain and Vercel AI SDK cookbooks#6520
tejakummarikuntla wants to merge 1 commit into
Kong:mainfrom
tejakummarikuntla:docs/langchain-vercel-ai-sdk-cookbooks

Conversation

@tejakummarikuntla

Copy link
Copy Markdown
Contributor

Two cookbooks showing how to route an SDK's OpenAI-compatible client through Kong AI Gateway, following the basic-llm-routing recipe structure (Service/Route + key-auth + AI Proxy, OpenAI-only):

  • LangChain (Python): ChatOpenAI base_url override, streaming, tool calling, agents, embeddings.
  • Vercel AI SDK: @ai-sdk/openai-compatible provider, generateText/ streamText, tool calling, structured output, Next.js route, embeddings.

Verified: client code executed against current libraries (langchain-openai 1.4.1, ai 7.0.44), and the ai-proxy + key-auth config loaded and proxied through a real Kong Gateway. Embeddings route type requires genai_category: text/embeddings (Gateway 3.11+).

Description

Fixes #issue

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

Two cookbooks showing how to route an SDK's OpenAI-compatible client
through Kong AI Gateway, following the basic-llm-routing recipe structure
(Service/Route + key-auth + AI Proxy, OpenAI-only):

- LangChain (Python): ChatOpenAI base_url override, streaming, tool
  calling, agents, embeddings.
- Vercel AI SDK: @ai-sdk/openai-compatible provider, generateText/
  streamText, tool calling, structured output, Next.js route, embeddings.

Verified: client code executed against current libraries (langchain-openai
1.4.1, ai 7.0.44), and the ai-proxy + key-auth config loaded and proxied
through a real Kong Gateway. Embeddings route type requires
genai_category: text/embeddings (Gateway 3.11+).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tejakummarikuntla
tejakummarikuntla requested a review from a team as a code owner July 31, 2026 03:40
@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

👷 Deploy request for kongdeveloper pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d60b923

@tomek-labuk tomek-labuk added the do not merge Issues/ PRs whose changes should not be merged at this time label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Issues/ PRs whose changes should not be merged at this time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants