docs(weave): add Neon AI Gateway tracing guide#2961
Open
mezotv wants to merge 1 commit into
Open
Conversation
Add a Weave integration guide for Neon AI Gateway, an OpenAI-compatible inference endpoint provided by Neon. Weave's existing OpenAI SDK autopatching traces these calls, so the guide only changes `api_key` and `base_url` on a standard `openai.OpenAI` client. The page follows the structure of the sibling OpenRouter and Together AI guides, and adds the two things that are specific to Neon: the gateway host is per database branch rather than a single shared hostname, and the catalog reports `pricing` as `null`, so traces show token counts without cost. Also add the page to the LLM Providers group in docs.json, between mistral and nvidia_nim.
mezotv
marked this pull request as ready for review
July 26, 2026 18:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a Weave integration guide for Neon AI Gateway, an OpenAI-compatible inference endpoint provided by Neon, plus the matching navigation entry in
docs.json.Why this needs no new Weave code. Neon AI Gateway is reached with the standard
openaiPython SDK pointed at a differentbase_url, so Weave's existing OpenAI SDK autopatching already traces these calls. The guide only changesapi_keyandbase_urlon anopenai.OpenAIclient. It follows the same shape as the siblingopenrouter.mdxandtogether_ai.mdxpages, including the closing pointer to the OpenAI guide.What is Neon-specific. Two things do not fit the single-shared-hostname pattern the other OpenAI-compatible pages assume:
NEON_AI_GATEWAY_BASE_URLandNEON_AI_GATEWAY_TOKENenvironment variables instead of a literal URL, and adds a short "Trace across branches" section on telling branches apart in traces.GET /v1/modelsreportspricingasnulland no cost field comes back on a response, so the page states plainly that traces show token counts without cost, rather than letting a reader assume the cost column will populate.The page also names the two model constraints a reader hits first: the Codex variants are served only on Neon's Responses API path and return
400on chat completions, and several models returnmessage.contentas an array of content blocks rather than a string.Scope is deliberately narrow, chat completions through the OpenAI SDK. The page makes no tool-calling, structured-output, embeddings, image, or audio claim, and it does not claim Weave has a native Neon provider integration.
Files:
weave/guides/integrations/neon.mdx(new, 90 lines)docs.json(one line,weave/guides/integrations/neoninserted betweenmistralandnvidia_nim)The diff is insertion-only: 91 added lines, 0 removed. English only;
fr,ja, andkoare left to the repo'sgt.config.jsontranslation pipeline.Testing
mint validatereportedsuccess build validation passed. This is the command.github/workflows/validate-mdx.ymlruns; I did not separately runmint dev.mint broken-linksreportedsuccess no broken links found.Also checked locally:
docs.jsonparses and the nav entry sits alphabetically betweenmistralandnvidia_nim; both Python snippets compile and thebashsnippet passesbash -n; frontmatter parses, code fences are even, and<Note>balances; the five external links each return200.Limitation worth stating up front. Neon AI Gateway is in beta and needs a paid Neon plan and an
aws-us-east-2project, and I did not issue live requests against a gateway branch while preparing this PR. The product statements on the page (the beta and region constraints, the credential scope and branch-lineage behaviour, the Responses-only Codex IDs, the array content-block shape, andpricing: null) come from Neon's published documentation and the documentedGET /v1/modelsresponse shape, not from a fresh live run. The snippets are syntax-checked, not executed end to end.One thing to flag for a maintainer. The closing sentence links
/weave/guides/integrations/openai#track-your-own-ops. The page resolves, but that heading anchor does not exist inopenai.mdx. I kept the sentence verbatim becauseopenrouter.mdxandtogether_ai.mdxboth use the identical sentence and anchor, so changing it here alone would make this page the odd one out. Happy to fix just this page, or all three, whichever you prefer.