Skip to content

chore: bump localrecall to fix PostgreSQL collection name with ':' (#10375)#10387

Merged
mudler merged 1 commit into
masterfrom
fix/bump-localrecall-10375
Jun 18, 2026
Merged

chore: bump localrecall to fix PostgreSQL collection name with ':' (#10375)#10387
mudler merged 1 commit into
masterfrom
fix/bump-localrecall-10375

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

What

Bumps github.com/mudler/localrecall to pull in mudler/LocalRecall#48.

Why

Fixes #10375. LocalAI namespaces per-user collections as {userID}:{name}. Under legacy API-key auth the userID is the literal legacy-api-key, so an agent's collection name becomes legacy-api-key:<agent>. localrecall's sanitizeTableName only replaced -, . and with underscores, so the : leaked into the interpolated CREATE TABLE DDL:

CREATE TABLE documents_legacy_api_key:LiteraryResearch (...)
ERROR: syntax error at or near ":" (SQLSTATE 42601)

This prevented agents with knowledge base / long-term memory from creating their PostgreSQL collection.

The upstream fix switches sanitizeTableName to an allowlist ([A-Za-z0-9_] → keep, everything else → _), producing a valid unquoted identifier for any collection name while preserving the per-user userID prefix that isolates tenants on a shared database.

Notes

  • Dependency-only change: go.mod / go.sum (localrecall …9a3b3321a9cd…d0073dd5dc32).
  • core/services/agentpool/... builds clean against the new version.

… fix

Pulls mudler/LocalRecall#48, which makes sanitizeTableName allowlist valid
identifier characters so collection names containing ':' (e.g. the per-user
"legacy-api-key:<agent>" namespace) no longer break PostgreSQL CREATE TABLE
with "syntax error at or near ':'".

Fixes #10375

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler mudler merged commit c4cd86b into master Jun 18, 2026
59 checks passed
@mudler mudler deleted the fix/bump-localrecall-10375 branch June 18, 2026 15:05
mudler added a commit that referenced this pull request Jun 24, 2026
…10471)

fix(agents): URL-decode collection/agent name path params

Collection and agent names carry a "legacy-api-key:" prefix, so the ':'
arrives percent-encoded as %3A in the request path. Echo routes such
paths via URL.RawPath and stores the matched path-param value still
escaped, so c.Param("name") returned "legacy-api-key%3ALiteraryResearch"
and the store lookup 404'd ("collection not found").

This was second-order fallout of #10375/#10387: once colons became valid
in names, the URL-decode gap surfaced on every name-bearing endpoint.

Add a decodedParam helper that url.PathUnescape's the param (falling back
to the raw value on invalid encoding) and wire it into all collection
endpoints and the agent :name endpoints, which share the identical
prefix. The entry endpoints already unescaped c.Param("*"); this closes
the same gap for :name.

Fixes #10443


Assisted-by: Claude:claude-opus-4-8 [Claude Code]

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent is created under the name that cannot be used as a name for a PostrreSQL database

2 participants