Skip to content

Preserve Gemma tool types and response whitespace - #228

Merged
mattt merged 2 commits into
mainfrom
mattt/pr-227-copilot-feedback
Sep 10, 2026
Merged

mattt merged 2 commits into
mainfrom
mattt/pr-227-copilot-feedback

Conversation

@mattt

@mattt mattt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Gemma tool declarations could describe nested argument types as strings, and transcript replay converted structured arrays and scalar tool results into quoted strings. This follow-up to #227 addresses all three comments from Copilot's re-review.

Gemma now explicitly rejects unsupported anyOf, oneOf, and allOf schemas at the root, in properties, and in array items, addressing the latest review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Referenced union schemas are still silently rendered as strings or empty parameter schemas.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Preserves Gemma schema types, structured tool-result types, and response whitespace during Llama transcript rendering.

Changes:

  • Recursively resolves Gemma schema references.
  • Preserves structured and mixed tool-output segment types.
  • Aligns completed-response whitespace handling and expands tests.
File summaries
File Description
Sources/AnyLanguageModel/Models/LlamaToolCallFormat.swift Resolves schemas and renders typed tool responses.
Sources/AnyLanguageModel/Models/LlamaLanguageModel.swift Preserves output whitespace and passes typed segments.
Tests/AnyLanguageModelTests/LlamaToolCallFormatTests.swift Tests nested schemas, whitespace, and typed responses.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Sources/AnyLanguageModel/Models/LlamaToolCallFormat.swift Outdated
@mattt
mattt merged commit 895e958 into main Sep 10, 2026
11 checks passed
@mattt
mattt deleted the mattt/pr-227-copilot-feedback branch September 10, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants