Skip to content

[DRAFT] Initial /v1/messages implementation - #2225

Draft
RobGeada wants to merge 3 commits into
NVIDIA-NeMo:developfrom
RobGeada:feat/NativeMessagesSupport
Draft

[DRAFT] Initial /v1/messages implementation#2225
RobGeada wants to merge 3 commits into
NVIDIA-NeMo:developfrom
RobGeada:feat/NativeMessagesSupport

Conversation

@RobGeada

@RobGeada RobGeada commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

Adds /v1/messages support to NeMo Guardrails, namely:

  • A native /v1/messages client, mirroring the native (non-langchain) OpenAI client, which allows for native communication with /v1/messages servers for inference, self-check, etc
  • A /v1/messages endpoint in the server, allowing for proxying of /v1/messages calls
  • A /v1/messages/checks endpoint: /v1/chat/completions is to v1/guardrail/checks as /v1/messages is to /v1/messages/checks

As well as unit tests verifying:

  • all possible fields in the messages are sent transparently through NeMo Guardrails
  • all fields in the pinned anthropic package are included in the API's AnthropicMessageRequest BaseModel

Related Issue(s)

#2226

Verification

All unit tests pass

Have manually verified:

  • Proxying to a /v1/messages model works as expected
  • /v1/messages models can be used as self-check models
  • Content is correctly extracted from a /v1/messages request and sent to guardrails
  • /v1/messages/checks works as expected/
  • Have successfully guardrailed Claude Code without noticing any obvious issue

AI Assistance

  • No AI tools were used.
  • AI tools were used; a human reviewed and can explain every change (tool: Claude Code).

Checklist

  • I've read the CONTRIBUTING guidelines.
  • This PR links to a triaged issue assigned to me.
  • My PR title follows the project commit convention.
  • I've updated the documentation if applicable.
  • I've added tests if applicable.
  • I've noted any verification beyond CI and any checks I couldn't run.
  • I did not update generated changelog files manually.
  • I addressed all CodeRabbit, Greptile, and other review comments, or replied with why no change is needed.
  • @mentions of the person or team responsible for reviewing proposed changes.

@github-actions github-actions Bot added status: needs triage New issues that have not yet been reviewed or categorized. needs: signing labels Jul 27, 2026
@RobGeada
RobGeada marked this pull request as draft July 27, 2026 14:43
Signed-off-by: Rob Geada <rob@geada.net>
@RobGeada
RobGeada force-pushed the feat/NativeMessagesSupport branch from 8178134 to d526ff1 Compare July 27, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XL status: needs triage New issues that have not yet been reviewed or categorized.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant