Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b3fc266cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: found issues before merge. What this changes: The PR adds Ollama-local normalization for Maintainer follow-up before merge: This is an active contributor PR with a concrete one-line correctness finding; the right next action is author or maintainer amendment on the PR branch, not an automated replacement branch. Security review: Security review cleared: The diff only changes Ollama stream name normalization and tests; it does not add dependencies, workflows, secrets handling, permissions, downloads, or lifecycle scripts. Review findings:
Review detailsBest possible solution: Amend the Ollama-local normalizer to consume the prefix separator while preserving names such as Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 6e5a703dd2db. |
|
Thanks @afurm. I landed the maintainer version on The landed patch keeps your Ollama adapter-boundary fix, but consumes the prefix separator as ClawSweeper noted, and adds extra guard coverage for non-prefixed names so we do not rewrite |
Summary
functions.execortools.execwithout normalization, so tool matching could fail in downstream dispatch.normalizeOllamaToolCallNameinextensions/ollama/src/stream.ts.convertToOllamaMessagespath viaextractToolCalls).buildAssistantMessage) so SDK-facing tool calls stay canonical.extensions/ollama/src/stream-runtime.test.tsfor both directions of normalization.Change Type
Scope
Linked Issue/PR
Root Cause
functions.*,tools.*) were passed through unchanged in Ollama-adapter conversion paths.Regression Test Plan
extensions/ollama/src/stream-runtime.test.tsfunctions.exec/tools.exectool-call names are normalized toexecin both outgoing Ollama messages and incoming tool-call reconstruction.User-visible / Behavior Changes
functions.*/tools.*prefixes now normalize to canonical names during Ollama conversion.Diagram
Before:
[user assistant toolCall (functions.exec)] -> [Ollama request conversion sends "functions.exec"] -> [tool lookup mismatch / no-op execution]
After:
[user assistant toolCall (functions.exec)] -> [normalize name -> "exec"] -> [Ollama conversion and SDK tool-call reconstruction use "exec"] -> [tool executes normally]
Security Impact
No)No)No)Nochanges in behavior, only name normalization)No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
functions.exec,tools.exec) from historical/Anthropic-compatible tool-call payloads.extensions/ollama/src/stream-runtime.test.ts(planned).Expected
Actual
Evidence
Human Verification (required)
convertToOllamaMessages) and inbound (buildAssistantMessage) tool-call conversions.Review Conversations
Compatibility / Migration
Yes)No)No)Risks and Mitigations
functionsortoolsas a literal prefix without separator..,/,_, or-and only in Ollama conversion paths; normal non-prefixed names are unchanged.