Repository navigation
[Automated] Draft docs (kagent): feat(outputschema): allow format, pattern and type lists, add opt-in… - #671
Closed
github-actions[bot] wants to merge 1 commit into
Closed
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…ttern and type lists, add opt-in… Signed-off-by: GitHub Action <action@github.com>
Contributor
|
Covered by #652 (v1.0.0-rc1 docs update). |
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.
kagent-dev/kagent#3284 — feat(outputschema): allow format, pattern and type lists, add opt-in outputSchemaStrict
Docs versions:
1.x(first shipped in v1.0.0-rc1)No code-path rule covers 11 touched file(s). The planner could route these only by identifier search, so the candidate pages may miss what they changed, including in the other mode:
docs/architecture/structured-output.mdgo/adk/pkg/agent/agent.gogo/adk/pkg/outputschema/convert.gogo/adk/pkg/outputschema/gemini.gogo/adk/pkg/outputschema/pattern.gogo/adk/pkg/outputschema/strict.goWhat changes for users: AgentTemplate structured-output schemas can now use
format, RE2pattern, and type lists such as["string","null"]. Users can also setspec.outputSchemaStrict: trueto ask OpenAI, Azure OpenAI, and Foundry in the OpenAI format to constrain generation to the schema; the default isfalse.What the docs now say: The Structured output guide now lists the expanded portable schema profile, explains provider-specific schema handling, adds a strict schema adherence section for
outputSchemaStrict, and adds the new schema failure messages to troubleshooting.Not verified: No cluster in CI; the configuration is unrun and internal links are unchecked.
How
kagent-3284was drafted, and what was not verifiedPlan, and what changed it
outputSchemaStrict,format,pattern, and type-list coverage where structured output is documented.apiFormatandmaxTokensfields, whiledocs-site/content/kagent/1.x/agents/structured-output.mdowns theoutputSchemaguide and was found by the required literal-string grep.Why a documentation change is necessary
The existing Structured output guide said
typeaccepted only one value and thatpatternandformatwere rejected. The pull request changes that surface: schemas can now use type lists, supported string formats, and RE2 patterns, and users can opt in to provider strict mode withoutputSchemaStrict. Without the page update, readers would avoid valid schemas and would not know how to restore strict provider enforcement for OpenAI-family providers.What changed on disk
docs-site/content/kagent/1.x/agents/structured-output.md— Updated the supported schema profile, added provider handling details, documentedoutputSchemaStrict, and expanded troubleshooting for strict-mode, pattern, and Gemini schema failures.How to verify this change
my-first-harnessHarness and an OpenAI, Azure OpenAI, or Foundry ModelConfig, apply an AgentTemplate that setsspec.outputSchemaStrict: trueand uses a schema withformat: date-time,pattern: ^OPS-[0-9]+$,required, andadditionalProperties: false.kubectl get agent <agent-name> -n kagent -o json | jq '[.status.conditions[] | select(.type == "Compatible")]'. TheCompatiblecondition should reportstatus: "True".additionalProperties: false, reapply it, and rerun the condition command. TheCompatiblecondition should reportUnsupportedConfigurationwith a message that starts withoutputSchemaStrict:.Proposed release note
No
proposed-release-note.md:markers.notes_placeableis false for this product. Suggested text for a reviewer to reuse: Structured output schemas now acceptformat, RE2pattern, and type lists such as["string","null"]. SetoutputSchemaStrict: trueon an AgentTemplate to ask OpenAI, Azure OpenAI, and Foundry in the OpenAI format to enforce the schema during generation; the default isfalse.What was not verified
How the pages were chosen (triage report)
Feature clusters
Kept apart on purpose. Merging wrongly produces a guide that documents two things and explains neither, so these are reported for a person to merge rather than grouped automatically:
docs-site/content/kagent/1.x/observability/launch-ui.mdas a candidate, but for one of them it is one page among more than 3, so they are kept apart; merge them if both drafts do land thereDraft a documentation change
kagent-dev/kagent#3284 — feat(outputschema): allow format, pattern and type lists, add opt-in outputSchemaStrict
kagent-dev/websiteoutputSchemacannot useformat,pattern, or a type list such as["string","null"]. So a schema cannot ask for an ISO date, a ticket ID likeOPS-123, or an optional string. OpenAI followsformatandpatternonly in strict mode, so this PR also addsoutputSchemaStrict.docs/architecture/structured-output.mdgo/adk/pkg/agent/agent.gogo/adk/pkg/outputschema/convert.gogo/adk/pkg/outputschema/gemini.gogo/adk/pkg/outputschema/pattern.gogo/adk/pkg/outputschema/strict.goDraft branch:
pr-tracker-draft-kagent-3284Important
The test suite has not run on this pull request. It was opened by
github-actions[bot], and GitHub does not start workflows for pull requests opened with the repository's own token. This repository's checks are held asaction_requireduntil somebody presses Approve and run on the Checks tab. Checks that come from GitHub Apps rather than Actions, such as DCO, run on their own.Please approve the checks before reviewing the content: an absence of failures here means the tests have not run, not that they passed.