Repository navigation
🖨️ fix: Regenerate the Agents OpenAPI Spec With repositoryInstructions - #16029
Merged
Merged
Conversation
Contributor
Author
|
Head |
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.
Summary
Every job in the
TypeScript type checksworkflow fails on currentdevat theOpenAPI spec drift checkstep, and with it every open pull request that rebases ondev:npm run -w @librechat/api openapi:checkreportsThe committed OpenAPI spec does not match the code. The committedpackages/api/openapi/agents.openapi.jsonis missing therepositoryInstructionsfield, because #16008 added that field to the agent schema and merged at 09:00 while #15928 committed a specification generated from a branch that predated it and merged at 19:50. This change regenerates the specification from the code, so the drift check passes again and the field appears in the published contract.Nothing but the generated artifact changes; the field itself already exists in
packages/api/src/agents/validation.tsand in the Mongoose schema.How it works
The generator writes what the zod registry holds, so
agentBaseSchemareachingAgentCreateRequest,AgentUpdateRequestandAgentputs the field in all three components:Change Type
Testing
Regenerated on a clean worktree of
devat 69f0dd2 and re-checked:npm run -w @librechat/api openapi:generate npm run -w @librechat/api openapi:check # The committed OpenAPI spec matches the code.The regenerated file is byte-identical to
dev's except for the threerepositoryInstructionsblocks, and its content matches the specification regenerated independently on #16028 (which differs only by that pull request's owntext/htmlerror responses).zod-openapi@4.2.4is the version the lockfile resolves, so the output matches what CI generates. Prettier andgit diff --checkpass; the file is listed in.prettierignoreas a generated artifact.No TypeScript source changed, so no workspace typecheck applies. Not run: the agents route suites, which this artifact does not affect.
Note: #16028 also regenerates this file as part of a larger change. This pull request is the one-file subset, so
devcan go green immediately; it can be closed as redundant if #16028 merges first.Checklist