Repository navigation
Document behavior_controls API parameter for prompt customization - #1743
Conversation
Add documentation for the behavior_controls field on /api/chat, which allows API consumers to selectively enable/disable prompt sections. Includes the full list of available section keys, fast mode and minimal prompt examples, and precedence rules for the ENABLED_PROMPTS env var. https://claude.ai/code/session_0188ZPUZhVzED8bjKuZ3zVSo Signed-off-by: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a new request-level prompt override mechanism ( Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant API as Chat API
participant PromptBuilder
participant Model
Client->>API: POST /api/chat with messages + behavior_controls
API->>PromptBuilder: build prompt (messages, env ENABLED_PROMPTS, behavior_controls)
PromptBuilder->>PromptBuilder: resolve enabled components (DISABLED_BY_DEFAULT, ENABLED_PROMPTS, behavior_controls)
PromptBuilder->>Model: send composed prompt
Model-->>API: response
API-->>Client: return response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for holmes-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/reference/http-api.md (1)
61-61: Clarify the exactbehavior_controlscontract in the field table.
behavior_controlsis documented as a genericobject, but the actual API shape isDict[str, bool]. It would help to spell out that this is a section-key → boolean map, and that unknown keys are ignored rather than rejected.✏️ Suggested doc tweak
-| behavior_controls | No | | object | Override prompt sections to enable/disable them (see [Fast Mode & Prompt Controls](`#fast-mode--prompt-controls`)) | +| behavior_controls | No | | object | Map of section keys to booleans, used to enable/disable prompt sections. Unknown keys are ignored. See [Fast Mode & Prompt Controls](`#fast-mode--prompt-controls`) |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/reference/http-api.md` at line 61, The docs currently list behavior_controls as a generic object; update the field description for behavior_controls to state its precise contract: it is a map/dictionary of section-key (string) → boolean (Dict[str, bool]) used to enable/disable prompt sections, and unknown keys are ignored (not rejected) by the API. Be concise and replace "object" with this explicit shape and behavior in the table entry for behavior_controls.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/reference/http-api.md`:
- Line 61: The docs currently list behavior_controls as a generic object; update
the field description for behavior_controls to state its precise contract: it is
a map/dictionary of section-key (string) → boolean (Dict[str, bool]) used to
enable/disable prompt sections, and unknown keys are ignored (not rejected) by
the API. Be concise and replace "object" with this explicit shape and behavior
in the table entry for behavior_controls.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 23c42897-970b-4db9-9569-1d2e29836820
📒 Files selected for processing (1)
docs/reference/http-api.md
Put practical examples (fast mode, minimal prompt, precedence rules) first so users see actionable content before the full reference table. https://claude.ai/code/session_0188ZPUZhVzED8bjKuZ3zVSo Signed-off-by: Claude <noreply@anthropic.com>
Add DISABLED_BY_DEFAULT set in prompt.py so that ai_safety is off unless explicitly enabled via behavior_controls or ENABLED_PROMPTS env var. Update docs and add tests for the new default behavior. https://claude.ai/code/session_0188ZPUZhVzED8bjKuZ3zVSo Signed-off-by: Claude <noreply@anthropic.com>
📂 Previous Runs📜 Run @ 9733591 (#22991250500)✅ Results of HolmesGPT evalsAutomatically triggered by commit 9733591 on branch Results of HolmesGPT evals
Benchmark comparison unavailable: No ci-benchmark experiments found Benchmark Comparison DetailsBaseline: latest ci-benchmark experiment on master Status: No ci-benchmark experiments found Comparison indicators:
✅ Results of HolmesGPT evalsAutomatically triggered by commit cc48939 on branch Results of HolmesGPT evals
Benchmark comparison unavailable: No ci-benchmark experiments found Benchmark Comparison DetailsBaseline: latest ci-benchmark experiment on master Status: No ci-benchmark experiments found Comparison indicators:
📖 Legend
🔄 Re-run evals manually
Option 1: Comment on this PR with Or with more options (one per line): Run evals on a different branch (e.g., master) for comparison:
Quick re-run: Use Option 2: Trigger via GitHub Actions UI → "Run workflow" Option 3: Add PR labels to include extra evals in automatic regression runs:
Examples: 🏷️ Valid tags
Commands: CLI: |
|
✅ Docker images ready for
Use these tags to pull the images for testing. 📋 Copy commandsgcloud auth configure-docker us-central1-docker.pkg.dev
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes:99f7309a
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes:99f7309a me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:99f7309a
docker push me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:99f7309a
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes-operator:99f7309a
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes-operator:99f7309a me-west1-docker.pkg.dev/robusta-development/development/holmes-operator-dev:99f7309a
docker push me-west1-docker.pkg.dev/robusta-development/development/holmes-operator-dev:99f7309aPatch Helm values in one line (choose the chart you use): HolmesGPT chart: helm upgrade --install holmesgpt ./helm/holmes \
--set registry=me-west1-docker.pkg.dev/robusta-development/development \
--set image=holmes-dev:99f7309a \
--set operator.registry=me-west1-docker.pkg.dev/robusta-development/development \
--set operator.image=holmes-operator-dev:99f7309aRobusta wrapper chart: helm upgrade --install robusta robusta/robusta \
--reuse-values \
--set holmes.registry=me-west1-docker.pkg.dev/robusta-development/development \
--set holmes.image=holmes-dev:99f7309a \
--set holmes.operator.registry=me-west1-docker.pkg.dev/robusta-development/development \
--set holmes.operator.image=holmes-operator-dev:99f7309a |
🔬 CLI Performance Benchmark🟡 Startup Time (no LLM)Measures
🟡 Full CLI with LLMMeasures
PR: |
Summary
Added comprehensive documentation for the
behavior_controlsAPI parameter, which allows fine-grained control over which prompt sections HolmesGPT includes in requests. This feature provides an API equivalent to the CLI's--fast-modeflag.Key Changes
behavior_controlsparameter to the HTTP API reference documentationENABLED_PROMPTSenv var,behavior_controlsparameter, and defaultsENABLED_PROMPTSenvironment variableNotable Details
ENABLED_PROMPTSenv var acts as a security boundary that cannot be overridden by client requestshttps://claude.ai/code/session_0188ZPUZhVzED8bjKuZ3zVSo
Summary by CodeRabbit
New Features
Documentation