Repository navigation
Conversation
|
99dc816 to
8dc08bf
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
66e9cb1 to
a95dc3b
Compare
7e78b93 to
9cdf959
Compare
a95dc3b to
bb80c4e
Compare
9cdf959 to
138d75a
Compare
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
afe73c2 to
d565e48
Compare
138d75a to
91bea76
Compare
tgasser-nv
left a comment
There was a problem hiding this comment.
Looks good, marking as comment only until the YAML format question in #2411 is answered
| index: | ||
| x-nemo-guardrails: | ||
| classification: opaque | ||
| logprobs: |
There was a problem hiding this comment.
The PR allows logprobs on the request-side but disable the logprobs response from the model. This is true for non-streaming and streaming. Recommend constraining logprobs with const: false and making top_logprobs a null-only disabled gate
| gate: disabled | ||
| extension: true | ||
| content: | ||
| type: string |
There was a problem hiding this comment.
Couldn't Streaming content could be null as well?
| type: array | ||
| x-nemo-guardrails: | ||
| classification: guarded | ||
| modalities: |
There was a problem hiding this comment.
The request projection rejects values that this supports:
- modalities: ["text"] (lines 61-67)
- response_format: {"type": "text"} (88-94)
- tool_choice: "none" (100-106)
- parallel_tool_calls: false (74-80)
Recommend declaring these as constrained with the expected value allowed
| x-nemo-guardrails: | ||
| unknown_fields: configurable | ||
| source: '#/components/schemas/ChatCompletionRequestUserMessage' | ||
| maxItems: 1 |
There was a problem hiding this comment.
Would this block a request with both system/developer and user entries?
Merge the updated contract foundation without rewriting the stack. Replace the handwritten full-operation YAML with a boundary summary and provider provenance checks; integration exports remain separate. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
PR merge guidance@Pouyanpi thanks for the PR. GitHub is currently blocking merge for one or more repository requirements:
Relevant guide: |
| The Python projections, bindings, and endpoint determine exact acceptance and | ||
| runtime behavior. Their machine-readable contract belongs with the integration, | ||
| not in a separately maintained handwritten policy here. Recognizing the request |
There was a problem hiding this comment.
This revision removes chat-completions.guard.yaml and says the machine-readable contract belongs with the integration, but PR #2435 modifies that file rather than adding it. Its streaming test reads the file directly, so stacking that PR on this head leaves the file missing and the test fails. The buffered export in PR #2414 does not provide the stream section the test needs.
Prompt To Fix With AI
This is a comment left during a code review.
Path: nemoguardrails/server/experimental/contracts/openai/README.md
Line: 31-33
Comment:
**Streaming contract is missing**
This revision removes `chat-completions.guard.yaml` and says the machine-readable contract belongs with the integration, but PR #2435 modifies that file rather than adding it. Its streaming test reads the file directly, so stacking that PR on this head leaves the file missing and the test fails. The buffered export in PR #2414 does not provide the stream section the test needs.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Superseded by #2413, which now includes this PR's remaining OpenAI provenance, boundary documentation, and metadata tests and targets #2411 directly. The endpoint-bound buffered contract export remains in #2414. The existing branch and commits are preserved. Review concerns about logprobs, explicit plain-text/no-tools values, message cardinality, and nullable stream content are linked from #2413 and are not resolved by closing this standalone PR. Revised stack: #2411 → #2413 → #2414. |
Superseded
This standalone PR is folded into #2413. Its remaining OpenAI source pin, boundary documentation, and provenance tests are already included there; #2413 now targets #2411 directly.
The authoritative Python models remain in #2413. The buffered contract is exported from the endpoint-bound models in #2414 at
contracts/openai/_generated/chat-completions.buffered.guard.yaml; it is not a separately maintained YAML policy. Streaming and its contract export remain separate work.No branch or commits are deleted. The review discussion is preserved. The logprobs, explicit plain-text/no-tools values, conversation-cardinality, and streaming-null questions are linked from #2413 and are not marked resolved by this consolidation.
Revised Stack
The Python projection models and runtime bindings are authoritative. This stack makes their policy explicit through typed declarations and exports a guard contract for inspection and documentation, not runtime configuration or a separately maintained policy.
#2412's remaining provider provenance, boundary documentation, and metadata tests are folded into #2413. Streaming implementation and its contract export are outside this buffered stack.
Review each PR against its parent branch; only #2411 targets
develop.pouyanpi/guard-contract-foundation-1developpouyanpi/openai-chat-buffered-projections-3pouyanpi/guard-contract-foundation-1pouyanpi/openai-chat-buffered-integration-4pouyanpi/openai-chat-buffered-projections-3AI Assistance
Checklist