🏷️ feat: Hide Model Spec Badge Rows#13124
Conversation
51c96e7 to
1f7194c
Compare
|
@codex review |
There was a problem hiding this comment.
Pull request overview
The PR's stated purpose is to add an optional hideBadgeRow flag to model specs so admins can suppress the chat input badge row for a configured spec, but the diff actually contains a much broader set of unrelated changes (shared-link targetMessageId plumbing, a tenant/request-context middleware refactor, a new Prometheus /metrics endpoint, request-context augmentations to winston/parsers in two places, an MCP servers initializer rewrite, Bedrock guardrail env-var resolution, an AttachmentGroup redesign, German locale additions, and new top-level dependencies).
Changes (as described):
- Adds
hideBadgeRowtoTModelSpectype and Zod schema, with documentation inlibrechat.example.yamland a schema test. ChatFormresolves the active model spec viagetModelSpecand skips renderingBadgeRowwhenhideBadgeRowis true.- Schema spec asserts that populated specs preserve
hideBadgeRow.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/data-provider/src/models.ts | Adds hideBadgeRow field to type and Zod schema (matches PR description). |
| packages/data-provider/specs/config-schemas.spec.ts | Adds coverage for the new field (matches PR description). |
| librechat.example.yaml | Documents the YAML option (matches PR description). |
| client/src/components/Chat/Input/ChatForm.tsx | Skips BadgeRow render when active spec sets hideBadgeRow (matches PR description). |
| packages/data-schemas/src/types/share.ts, methods/share.ts, methods/share.test.ts | Adds targetMessageId to share results, sorts getSharedLink by updatedAt, threads target through updateSharedLink. |
| packages/data-provider/src/types.ts, schemas.ts, data-service.ts, react-query/react-query-service.ts | Propagates targetMessageId through shared-link types/services and updates query cache shape. |
| client/src/data-provider/mutations.ts, components/Conversations/ConvoOptions/SharedLinkButton.tsx | Wires targetMessageId into the share-update mutation and UI. |
| api/server/routes/share.js | Validates and forwards targetMessageId on PATCH. |
| packages/data-schemas/src/index.ts, config/tenantContext.ts, config/tenantContext.spec.ts | Exposes getUserId/getRequestId and propagates them through runAsSystem. |
| packages/data-schemas/src/config/winston.ts, config/parsers.ts, config/parsers.spec.ts | Injects request context into log records and trailers. |
| api/config/winston.js, config/parsers.js, config/tests/parsers.spec.js | Mirrors the same logging changes for the CJS api package. |
| packages/api/src/middleware/tenant.ts, middleware/preAuthTenant.ts, middleware/preAuthTenant.spec.ts, middleware/tests/tenant.spec.ts | Adds buildTenantContext/runWithTenantContext, propagates user/request IDs, restructures rejection paths and tests. |
| api/server/middleware/requireJwtAuth.js, middleware/tests/requireJwtAuth.spec.js | Re-orders auth so CloudFront cookie refresh runs inside tenant ALS and adds tests. |
| packages/api/src/mcp/registry/MCPServersInitializer.ts, registry/cache/RegistryStatusCache.ts, registry/tests/MCPServersInitializer.test.ts | Adds config fingerprinting, follower wait/timeout fallback, and new env-var knobs. |
| packages/api/src/app/metrics.ts, app/metrics.spec.ts, app/index.ts | New Prometheus metrics module/router with bearer auth and path normalization. |
| api/server/index.js, api/server/index.metrics.spec.js | Wires metricsMiddleware and /metrics router into the app and adds integration tests. |
| api/package.json, packages/api/package.json, package-lock.json | Adds prom-client and @aws-sdk/credential-providers (the latter has no in-PR consumer). |
| packages/api/src/types/bedrock.ts, endpoints/bedrock/initialize.ts, endpoints/bedrock/initialize.spec.ts | Adds streamProcessingMode field and resolves env-vars in guardrail identifier/version. |
| packages/api/src/cdn/cloudfront-cookies.ts, cdn/tests/cloudfront-cookies.test.ts, api/server/services/AuthService.js, AuthService.spec.js | Suppresses cloudfront_disabled skip-debug logging. |
| client/src/components/Chat/Messages/Content/Parts/Attachment.tsx and tests | Introduces FileAttachmentGroup collapse/expand for multiple downloadable attachments and updates tests. |
| client/src/locales/en/translation.json, de/translation.json | Adds keys for new file-grouping UI plus a large set of unrelated German translations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
GitNexus: 🚀 deployedThe |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
GitNexus: 🚀 deployedThe |
* feat: hide model spec badge row * chore: import order * feat: hide model spec badge row
* feat: hide model spec badge row * chore: import order * feat: hide model spec badge row
Summary
I added an optional model spec setting that hides the chat input badge row when an admin-configured spec should not expose tool toggles.
hideBadgeRowto the shared model spec type and Zod schema solibrechat.yamlpreserves the option.ChatFormand skipped renderingBadgeRowwhenhideBadgeRowis enabled.hideBadgeRow.Change Type
Testing
npx jest specs/config-schemas.spec.ts --runInBandnpm run build:data-providernpx eslint client/src/components/Chat/Input/ChatForm.tsx packages/data-provider/src/models.ts packages/data-provider/specs/config-schemas.spec.tsTest Configuration:
Checklist