Fix/brave search api key readonly (#648)

* fix(secure-cli): resolve ambiguous column in LookupByBinary JOIN query (#641)

LookupByBinary uses LEFT JOIN with secure_cli_user_credentials but
SELECT columns lacked table alias prefix, causing PostgreSQL error:
"column reference 'id' is ambiguous (SQLSTATE 42702)"

This silently broke ALL credentialed CLI exec — commands fell through
to regular shell exec without injected env vars.

Fix: use b.-prefixed column names for JOIN queries.
Also add diagnostic logging to lookupCredentialedBinary for future debugging.

* fix(agent): defer warning messages after parallel tool results (#644)

When parallel tool calls trigger loop detection warnings, the warning
messages (role="user") were inserted between tool result messages
(role="tool"). This breaks the Anthropic API when routed through
OpenAI-compatible proxies (e.g. LiteLLM): the proxy groups consecutive
tool messages into a single user message with tool_result blocks, but
an intervening user warning splits the group, causing orphaned
tool_results and HTTP 400 "tool_use ids without tool_result blocks".

Fix: accumulate warning messages during parallel result processing and
append them after all tool results, preserving the consecutive grouping.

Closes #642

* fix(web): allow editing Brave Search API key when masked

---------

Co-authored-by: Viet Tran <viettranx@gmail.com>
This commit is contained in:
Huy DoanandViet Tran authored and GitHub committed 2026-04-02 18:39:30 +07:00
1 parent 7418cb62aa
commit 1170a85eb4
1 file changed
+1 -3
@@ -125,9 +125,7 @@ export function ToolsWebSection({ data, onSave, saving }: Props) {
<Input
type="password"
className="text-base md:text-sm"
value={brave.api_key ?? ""}
disabled={isSecret(brave.api_key)}
readOnly={isSecret(brave.api_key)}
value={isSecret(brave.api_key) ? "" : (brave.api_key ?? "")}
onChange={(e) =>
updateNested("web", { brave: { ...brave, api_key: e.target.value } })
}