Skip to content

🏷️ feat: Hide Model Spec Badge Rows#13124

Merged
danny-avila merged 3 commits into
devfrom
danny-avila/model-spec-hide-badge-row
May 14, 2026
Merged

🏷️ feat: Hide Model Spec Badge Rows#13124
danny-avila merged 3 commits into
devfrom
danny-avila/model-spec-hide-badge-row

Conversation

@danny-avila

Copy link
Copy Markdown
Owner

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.

  • Added hideBadgeRow to the shared model spec type and Zod schema so librechat.yaml preserves the option.
  • Looked up the active model spec in ChatForm and skipped rendering BadgeRow when hideBadgeRow is enabled.
  • Documented the YAML option in the model specs example.
  • Added schema coverage to confirm populated model specs retain hideBadgeRow.

Change Type

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Testing

  • npx jest specs/config-schemas.spec.ts --runInBand
  • npm run build:data-provider
  • npx eslint client/src/components/Chat/Input/ChatForm.tsx packages/data-provider/src/models.ts packages/data-provider/specs/config-schemas.spec.ts

Test Configuration:

  • macOS
  • Node dependencies reused from the main local checkout for this worktree

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

Copilot AI review requested due to automatic review settings May 14, 2026 13:04
@danny-avila danny-avila force-pushed the danny-avila/model-spec-hide-badge-row branch from 51c96e7 to 1f7194c Compare May 14, 2026 13:06

Copy link
Copy Markdown
Owner Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 hideBadgeRow to TModelSpec type and Zod schema, with documentation in librechat.example.yaml and a schema test.
  • ChatForm resolves the active model spec via getModelSpec and skips rendering BadgeRow when hideBadgeRow is 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.

Comment thread librechat.example.yaml
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: 🚀 deployed

The LibreChat-pr-13124 index is now live on the MCP server.
Deploy run

@danny-avila danny-avila changed the base branch from main to dev May 14, 2026 13:20

Copy link
Copy Markdown
Owner Author

@codex review

@danny-avila danny-avila marked this pull request as ready for review May 14, 2026 13:27
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: 🚀 deployed

The LibreChat-pr-13124 index is now live on the MCP server.
Deploy run

@danny-avila danny-avila merged commit 738ed00 into dev May 14, 2026
17 checks passed
@danny-avila danny-avila deleted the danny-avila/model-spec-hide-badge-row branch May 14, 2026 13:39
fuuuzzy pushed a commit to fuuuzzy/LibreChat that referenced this pull request May 15, 2026
* feat: hide model spec badge row

* chore: import order

* feat: hide model spec badge row
patricia2510 pushed a commit to lexaeon-org/libre-chat that referenced this pull request May 21, 2026
* feat: hide model spec badge row

* chore: import order

* feat: hide model spec badge row
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants