Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions authbridge/sparc-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ supports** works by setting the model string and (optionally) extra client kwarg
| `OLLAMA_BASE_URL` | `http://localhost:11434` | ollama endpoint |
| `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. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Suggested change
| `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.


### Provider examples

Expand Down
Loading