docs: Adds documentation for prompt plugin#2524
Conversation
|
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds 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
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Confidence Score: 5/5Documentation-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
Reviews (2): Last reviewed commit: "docs: Adds documentation for prompt plug..." | Re-trigger Greptile |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (2)
docs/media/prompt-plugin-llm-log.pngis excluded by!**/*.pngdocs/media/prompt-plugin-version-commit.pngis excluded by!**/*.png
📒 Files selected for processing (4)
docs/docs.jsondocs/features/prompt-repository/playground.mdxdocs/features/prompt-repository/prompts-plugin.mdxtransports/config.schema.json
dce3ac6 to
479e04d
Compare
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (2)
docs/media/prompt-plugin-llm-log.pngis excluded by!**/*.pngdocs/media/prompt-plugin-version-commit.pngis excluded by!**/*.png
📒 Files selected for processing (4)
docs/docs.jsondocs/features/prompt-repository/playground.mdxdocs/features/prompt-repository/prompts-plugin.mdxtransports/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
Merge activity
|
The base branch was changed.

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
prompts-plugin.mdxexplaining how to use the Prompts plugin with Chat Completions and Responses requestsdocs.jsonto include the new prompts plugin documentationpromptsin the list of built-in pluginsType of change
Affected areas
How to test
Verify documentation builds and renders correctly:
Test the documented functionality:
bf-prompt-idandbf-prompt-versionwith Chat Completions requestsScreenshots/Recordings
Added two new documentation screenshots:
prompt-plugin-version-commit.png- Shows the version commit interface in the playgroundprompt-plugin-llm-log.png- Shows the LLM log output for a request using the prompts pluginBreaking changes
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
docs/contributing/README.mdand followed the guidelines