Skip to content

docs(weave): add Neon AI Gateway tracing guide#2961

Open
mezotv wants to merge 1 commit into
wandb:mainfrom
mezotv:docs/weave-neon-ai-gateway
Open

docs(weave): add Neon AI Gateway tracing guide#2961
mezotv wants to merge 1 commit into
wandb:mainfrom
mezotv:docs/weave-neon-ai-gateway

Conversation

@mezotv

@mezotv mezotv commented Jul 26, 2026

Copy link
Copy Markdown

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 openai Python SDK pointed at a different base_url, so Weave's existing OpenAI SDK autopatching already traces these calls. The guide only changes api_key and base_url on an openai.OpenAI client. It follows the same shape as the sibling openrouter.mdx and together_ai.mdx pages, 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 has no one gateway hostname. Each database branch gets its own host, so the page drives everything from the NEON_AI_GATEWAY_BASE_URL and NEON_AI_GATEWAY_TOKEN environment variables instead of a literal URL, and adds a short "Trace across branches" section on telling branches apart in traces.
  • GET /v1/models reports pricing as null and 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 400 on chat completions, and several models return message.content as 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/neon inserted between mistral and nvidia_nim)

The diff is insertion-only: 91 added lines, 0 removed. English only; fr, ja, and ko are left to the repo's gt.config.json translation pipeline.

Testing

  • Local build succeeds without errors — mint validate reported success build validation passed. This is the command .github/workflows/validate-mdx.yml runs; I did not separately run mint dev.
  • Local link check succeeds without errors — mint broken-links reported success no broken links found.
  • PR tests succeed — opened as a draft so CI can report first.

Also checked locally: docs.json parses and the nav entry sits alphabetically between mistral and nvidia_nim; both Python snippets compile and the bash snippet passes bash -n; frontmatter parses, code fences are even, and <Note> balances; the five external links each return 200.

Limitation worth stating up front. Neon AI Gateway is in beta and needs a paid Neon plan and an aws-us-east-2 project, 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, and pricing: null) come from Neon's published documentation and the documented GET /v1/models response 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 in openai.mdx. I kept the sentence verbatim because openrouter.mdx and together_ai.mdx both 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.

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
mezotv marked this pull request as ready for review July 26, 2026 18:13
@mezotv
mezotv requested a review from a team as a code owner July 26, 2026 18:13
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.

1 participant