docs(sparc-service): document SPARC_LOG_REQUESTS and SPARC_STRIP_TOOL_ARG_KEYS - #741
docs(sparc-service): document SPARC_LOG_REQUESTS and SPARC_STRIP_TOOL_ARG_KEYS#741vz-ibm wants to merge 1 commit into
Conversation
…_ARG_KEYS These two env vars were introduced by PR rossoctl#738 (merged 2026-08-10) but never added to the sparc-service README's Configuration table. Documenting them here so operators discover them without having to read settings.py. Not touched here (not on main yet): SPARC_SKIP_TOOLS, SPARC_DEBUG_LLM, and SPARC_SCHEMA_IN_PROMPT — those arrive with PR rossoctl#739, and will be documented in a follow-up PR once that merges. Signed-off-by: Vitaly Zabershinsky <VITALYZ@il.ibm.com>
📝 WalkthroughWalkthroughThe README documents ChangesSPARC configuration documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@authbridge/sparc-service/README.md`:
- Line 105: Update the SPARC_STRIP_TOOL_ARG_KEYS documentation to describe
tool_calls[].function.arguments as a JSON-encoded string; clarify that the
string is decoded and the configured keys are removed from the resulting
argument object before SPARC evaluates the call.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1eef62e9-2fc6-40ae-8d79-f98d45209797
📒 Files selected for processing (1)
authbridge/sparc-service/README.md
| | `OPENAI_API_KEY` / `OPENAI_BASE_URL` | — | openai creds (LiteLLM also reads provider keys from env: `OPENAI_API_KEY`, `AZURE_API_KEY`, `ANTHROPIC_API_KEY`, …) | | ||
| | `HOST` / `PORT` | `0.0.0.0` / `8090` | bind address | | ||
| | `SPARC_LOG_REQUESTS` | `false` | When `true`, log every incoming `/reflect` request (including tool arguments) at INFO. Off by default because arguments can carry PII, payment ids, and other payload data. | | ||
| | `SPARC_STRIP_TOOL_ARG_KEYS` | — | Comma-separated argument keys to remove from every `tool_calls[].function.arguments` object before SPARC evaluates the call, e.g. `SPARC_STRIP_TOOL_ARG_KEYS=session_id,request_id`. Useful when an agent injects keys that aren't in the tool spec, which would otherwise make SPARC reject the call. | |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Describe tool_calls[].function.arguments as JSON-encoded arguments.
Lines 46-48 represent arguments as a JSON string, not an object. State that the configured keys are removed from the decoded argument object before evaluation. This keeps the configuration description consistent with the request schema.
Proposed wording
-| `SPARC_STRIP_TOOL_ARG_KEYS` | — | Comma-separated argument keys to remove from every `tool_calls[].function.arguments` object before SPARC evaluates the call, e.g. `SPARC_STRIP_TOOL_ARG_KEYS=session_id,request_id`. Useful when an agent injects keys that aren't in the tool spec, which would otherwise make SPARC reject the call. |
+| `SPARC_STRIP_TOOL_ARG_KEYS` | — | Comma-separated argument keys to remove from each decoded `tool_calls[].function.arguments` object before SPARC evaluates the call, e.g. `SPARC_STRIP_TOOL_ARG_KEYS=session_id,request_id`. Useful when an agent injects keys that aren't in the tool spec, which would otherwise make SPARC reject the call. |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | `SPARC_STRIP_TOOL_ARG_KEYS` | — | Comma-separated argument keys to remove from every `tool_calls[].function.arguments` object before SPARC evaluates the call, e.g. `SPARC_STRIP_TOOL_ARG_KEYS=session_id,request_id`. Useful when an agent injects keys that aren't in the tool spec, which would otherwise make SPARC reject the call. | | |
| | `SPARC_STRIP_TOOL_ARG_KEYS` | — | Comma-separated argument keys to remove from each decoded `tool_calls[].function.arguments` object before SPARC evaluates the call, e.g. `SPARC_STRIP_TOOL_ARG_KEYS=session_id,request_id`. Useful when an agent injects keys that aren't in the tool spec, which would otherwise make SPARC reject the call. | |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@authbridge/sparc-service/README.md` at line 105, Update the
SPARC_STRIP_TOOL_ARG_KEYS documentation to describe
tool_calls[].function.arguments as a JSON-encoded string; clarify that the
string is decoded and the configured keys are removed from the resulting
argument object before SPARC evaluates the call.
Summary
Documents two
sparc-serviceenv vars that were introduced by PR #738 (merged 2026-08-10) but never added to the README's Configuration table:SPARC_LOG_REQUESTSSPARC_STRIP_TOOL_ARG_KEYSAddresses part of the "Undocumented env vars" item flagged in the PR #739 review (#739 (comment), section 7).
Scope
Deliberately partial — only vars present on
maintoday. The remaining ones (SPARC_SKIP_TOOLS,SPARC_DEBUG_LLM,SPARC_SCHEMA_IN_PROMPT) are introduced by PR #739 and will be documented in a follow-up doc-only PR once that merges, to keep this PR narrow and mergeable independently.Test plan
Summary by CodeRabbit