Skip to content

docs: Adds documentation for prompt plugin#2524

Merged
akshaydeo merged 3 commits intov1.5.0from
04-06-docs_adds_documentation_for_prompt_plugin
Apr 6, 2026
Merged

docs: Adds documentation for prompt plugin#2524
akshaydeo merged 3 commits intov1.5.0from
04-06-docs_adds_documentation_for_prompt_plugin

Conversation

@roroghost17
Copy link
Copy Markdown
Contributor

@roroghost17 roroghost17 commented Apr 6, 2026

Summary

Adds comprehensive documentation for the Prompts plugin, which enables using committed prompt templates from the Prompt Repository in production inference requests via HTTP headers.

Changes

  • Added new documentation page prompts-plugin.mdx explaining how to use the Prompts plugin with Chat Completions and Responses requests
  • Updated navigation in docs.json to include the new prompts plugin documentation
  • Added cross-reference link from playground documentation to the prompts plugin page
  • Updated plugin schema description to include prompts in the list of built-in plugins
  • Added two new screenshots showing version commit interface and LLM log output

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (Next.js)
  • Docs

How to test

Verify documentation builds and renders correctly:

# Navigate to docs directory and build
cd docs
npm install
npm run build

# Verify new page is accessible and navigation works
npm run dev
# Navigate to /features/prompt-repository/prompts-plugin

Test the documented functionality:

  • Set up a prompt in the repository with committed versions
  • Use the HTTP headers bf-prompt-id and bf-prompt-version with Chat Completions requests
  • Verify prompt templates are prepended and model parameters are merged

Screenshots/Recordings

Added two new documentation screenshots:

  • prompt-plugin-version-commit.png - Shows the version commit interface in the playground
  • prompt-plugin-llm-log.png - Shows the LLM log output for a request using the prompts plugin

Breaking changes

  • Yes
  • No

Related issues

Documents the Prompts plugin functionality for connecting the Prompt Repository to production inference requests.

Security considerations

Documentation covers the use of HTTP headers for prompt resolution, which should be validated against the existing authentication and authorization mechanisms.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 6, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ impoiler
❌ roroghost17
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 6, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added a new Prompts plugin documentation page describing how committed prompt versions are resolved and applied to inference requests, header/context usage, merging behavior, streaming implications, examples, caching, and SDK guidance.
    • Added a "Using prompts in production" subsection to the Prompt Repository docs.
    • Updated plugin configuration docs to list "prompts" as a built-in plugin.

Walkthrough

Adds documentation and navigation entries for a new Prompts plugin that resolves committed prompts/versions (via HTTP headers or context), merges stored model parameters, prepends message/input content for inferences, and documents caching and SDK resolver guidance. Also updates plugin name description in transport schema.

Changes

Cohort / File(s) Summary
Documentation Navigation
docs/docs.json
Inserted features/prompt-repository/prompts-plugin into the Documentation → Open Source Features → Prompt Repository pages array.
Prompt Repository Documentation
docs/features/prompt-repository/playground.mdx, docs/features/prompt-repository/prompts-plugin.mdx
Added a production usage section to playground.mdx linking to a new prompts-plugin.mdx. The new page describes header/context-based prompt resolution, defaulting to latest committed version, resolve-then-transform flow (merge stored model params while preserving client overrides, prepend committed message history to messages or input), warning-only handling for unknown IDs/versions, streaming behavior, caching/reload semantics, curl examples, and Go SDK/resolver guidance.
Configuration Schema
transports/config.schema.json
Updated the human-readable description for plugins[].name to list prompts among built-in plugin names (text-only description change).

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Gateway
  participant PromptsPlugin
  participant PromptRepo
  participant Model

  Client->>Gateway: inference request (+ optional bf-prompt-id/version headers)
  Gateway->>PromptsPlugin: forward request / context
  PromptsPlugin->>PromptRepo: resolve prompt id & version (headers or context)
  Note right of PromptRepo: returns committed prompt version (or none)
  PromptRepo-->>PromptsPlugin: committed prompt + model params + messages
  PromptsPlugin->>PromptsPlugin: merge stored model params into request (preserve client overrides)\nprepend committed messages to messages/input
  PromptsPlugin-->>Gateway: modified request (or pass-through if no prompt)
  Gateway->>Model: send merged inference request (may enable streaming)
  Model-->>Gateway: inference response (streaming or non-streaming)
  Gateway-->>Client: response
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 I hop through docs with a parchment and pen,
Headers and versions fetched now and then,
I merge, I prepend, I keep client voice clear,
Caches refreshed, examples appear—cheer! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding documentation for the Prompts plugin, which is the primary purpose of this PR.
Description check ✅ Passed The description follows the template structure comprehensively, covering Summary, Changes, Type of change, Affected areas, How to test, Screenshots, Breaking changes, Related issues, Security considerations, and Checklist sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 04-06-docs_adds_documentation_for_prompt_plugin

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor Author

roroghost17 commented Apr 6, 2026

@roroghost17 roroghost17 mentioned this pull request Apr 6, 2026
18 tasks
@roroghost17 roroghost17 marked this pull request as ready for review April 6, 2026 09:42
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 6, 2026

Confidence Score: 5/5

Documentation-only PR with no logic changes; safe to merge.

All findings are P2 style/clarity suggestions. No broken links, no incorrect behavioral claims (the prior streaming thread was resolved by the senior developer), and nav registration is correct.

No files require special attention.

Important Files Changed

Filename Overview
docs/features/prompt-repository/prompts-plugin.mdx New documentation page for the Prompts plugin; well-structured with flowchart, header table, curl examples, and Go SDK section
docs/docs.json Navigation correctly updated to register the prompts-plugin page under the Prompt Repository group
docs/features/prompt-repository/playground.mdx Added a cross-reference link to the prompts-plugin page at the end of the file
transports/config.schema.json Added 'prompts' to the built-in plugin names in the description annotation; schema structure is unchanged
docs/media/prompt-plugin-llm-log.png New screenshot showing LLM log output for a request using the prompts plugin
docs/media/prompt-plugin-version-commit.png New screenshot showing the version commit interface in the playground

Reviews (2): Last reviewed commit: "docs: Adds documentation for prompt plug..." | Re-trigger Greptile

Comment thread docs/features/prompt-repository/prompts-plugin.mdx
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
docs/features/prompt-repository/prompts-plugin.mdx (1)

113-113: Prefer a concrete quantifier over “small number.”

Consider “a few store queries” or a specific count/range for clearer operational expectations.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/features/prompt-repository/prompts-plugin.mdx` at line 113, Replace the
vague phrase "a small number of store queries" in the prompts-plugin.mdx
sentence describing the in-memory cache load with a concrete quantifier such as
"a few store queries" or a specific count/range (e.g., "2–5 store queries") so
operational expectations are clearer; update the sentence that currently reads
"loaded with a small number of store queries at startup" to use the chosen
concrete wording.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/features/prompt-repository/prompts-plugin.mdx`:
- Line 107: Update the paragraph mentioning `"stream": true` behavior to
explicitly state the default when `stream` is absent in stored model parameters:
document that for legacy/initial prompt-repository versions a missing `stream`
may be treated as true (enabling streaming transport), and clarify that
client-side `stream` flags continue to be merged with stored params as before;
update the sentence containing `"stream": true` and the sentence referencing
"Client-side `stream` flags" to include this default-true note so readers know
how missing values are interpreted during reconstructions.

In `@transports/config.schema.json`:
- Line 929: Update the plugin description string in the schema's "description"
for the plugin name to include the missing built-in "datadog" entry so the text
matches the actual allowed values defined in the allOf block; locate the
"description" for the plugin name in the transports config schema (the same
property that currently lists built-in: telemetry, prompts, logging, governance,
maxim, semantic_cache, otel, litellmcompat, or custom plugin name) and add
"datadog" to that list so the human-readable docs in the schema remain
authoritative and in sync with the implemented built-ins.

---

Nitpick comments:
In `@docs/features/prompt-repository/prompts-plugin.mdx`:
- Line 113: Replace the vague phrase "a small number of store queries" in the
prompts-plugin.mdx sentence describing the in-memory cache load with a concrete
quantifier such as "a few store queries" or a specific count/range (e.g., "2–5
store queries") so operational expectations are clearer; update the sentence
that currently reads "loaded with a small number of store queries at startup" to
use the chosen concrete wording.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eba749a1-447a-42a1-8a91-38e053356745

📥 Commits

Reviewing files that changed from the base of the PR and between 1fa8785 and dce3ac6.

⛔ Files ignored due to path filters (2)
  • docs/media/prompt-plugin-llm-log.png is excluded by !**/*.png
  • docs/media/prompt-plugin-version-commit.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • docs/docs.json
  • docs/features/prompt-repository/playground.mdx
  • docs/features/prompt-repository/prompts-plugin.mdx
  • transports/config.schema.json

Comment thread docs/features/prompt-repository/prompts-plugin.mdx
Comment thread transports/config.schema.json Outdated
@roroghost17 roroghost17 force-pushed the 04-06-docs_adds_documentation_for_prompt_plugin branch from dce3ac6 to 479e04d Compare April 6, 2026 10:08
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/features/prompt-repository/prompts-plugin.mdx (1)

85-85: Clarify actor responsibility in request transformation flow.

Line 85 currently implies the provider prepends prompt-version messages, while earlier sections describe this as plugin pre-processing. Reword to avoid architectural confusion.

✏️ Proposed wording fix
-The provider receives the **stored** messages from the prompt version, checks if the request is streaming or non-streaming, applies the additional model parameters from the request and prepends the messages from the prompt version followed by your user message.
+Before provider invocation, the plugin prepends the committed prompt-version messages and merges model parameters; the provider then receives the final request in either streaming or non-streaming mode.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/features/prompt-repository/prompts-plugin.mdx` at line 85, The sentence
beginning "The provider receives the **stored** messages..." incorrectly assigns
the action of prepending prompt-version messages to the provider; update the
wording to state that the provider receives stored messages, checks streaming vs
non-streaming and applies model parameters, while the plugin pre-processing step
is responsible for prepending the prompt-version messages followed by the user
message—use the terms "provider" (for receiving/checking/applying) and "plugin
pre-processing" (for prepending prompt-version messages) to make the actor
responsibilities explicit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/features/prompt-repository/prompts-plugin.mdx`:
- Line 113: The sentence "The plugin keeps an in-memory cache of prompts and
versions (loaded with a small number of store queries at startup)." is vague;
replace the phrase "a small number of" with "a few" so it reads "(loaded with a
few store queries at startup)" to tighten wording and improve readability in
prompts-plugin.mdx.

---

Nitpick comments:
In `@docs/features/prompt-repository/prompts-plugin.mdx`:
- Line 85: The sentence beginning "The provider receives the **stored**
messages..." incorrectly assigns the action of prepending prompt-version
messages to the provider; update the wording to state that the provider receives
stored messages, checks streaming vs non-streaming and applies model parameters,
while the plugin pre-processing step is responsible for prepending the
prompt-version messages followed by the user message—use the terms "provider"
(for receiving/checking/applying) and "plugin pre-processing" (for prepending
prompt-version messages) to make the actor responsibilities explicit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9ac72a17-1c8a-4bc3-823d-470b274ff2cf

📥 Commits

Reviewing files that changed from the base of the PR and between dce3ac6 and 479e04d.

⛔ Files ignored due to path filters (2)
  • docs/media/prompt-plugin-llm-log.png is excluded by !**/*.png
  • docs/media/prompt-plugin-version-commit.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • docs/docs.json
  • docs/features/prompt-repository/playground.mdx
  • docs/features/prompt-repository/prompts-plugin.mdx
  • transports/config.schema.json
✅ Files skipped from review due to trivial changes (3)
  • docs/docs.json
  • docs/features/prompt-repository/playground.mdx
  • transports/config.schema.json

Comment thread docs/features/prompt-repository/prompts-plugin.mdx
coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 6, 2026
Copy link
Copy Markdown
Contributor

akshaydeo commented Apr 6, 2026

Merge activity

  • Apr 6, 10:41 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 6, 10:44 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo akshaydeo changed the base branch from 03-17-feat_allow_message_selection_while_committing_a_prompt_version to graphite-base/2524 April 6, 2026 10:43
@akshaydeo akshaydeo changed the base branch from graphite-base/2524 to v1.5.0 April 6, 2026 10:43
@akshaydeo akshaydeo dismissed coderabbitai[bot]’s stale review April 6, 2026 10:43

The base branch was changed.

@akshaydeo akshaydeo merged commit cf9908d into v1.5.0 Apr 6, 2026
12 of 15 checks passed
@akshaydeo akshaydeo deleted the 04-06-docs_adds_documentation_for_prompt_plugin branch April 6, 2026 10:44
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.

4 participants