Skip to content

Remove deprecated APIs - #286

Open
mattt wants to merge 2 commits into
mainfrom
mattt/remove-deprecated
Open

mattt wants to merge 2 commits into
mainfrom
mattt/remove-deprecated

Conversation

@mattt

@mattt mattt commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

This PR removes the 16 declarations that were deprecated ahead of 1.0 (#210):

  • GeneratedContentConversionError, which was renamed to GeneratedContentError
  • LlamaLanguageModel.init(modelPath:contextSize:batchSize:threads:seed:temperature:topK:topP:repeatPenalty:repeatLastN:) and the nine matching properties, which GenerationOptions[custom: LlamaLanguageModel.self] replaced
  • GeminiLanguageModel.init(baseURL:apiKey:apiVersion:model:thinking:serverTools:session:), the thinking and serverTools properties, and the Thinking and ServerTool typealiases, which GenerationOptions[custom: GeminiLanguageModel.self] and the types in GeminiLanguageModel.CustomGenerationOptions replaced

Requests that don't set custom options behave as before: Gemini still defaults to thinking disabled and no server tools, and llama.cpp uses the same defaults.

@mattt
mattt requested a balanced review from Copilot October 2, 2026 12:34

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.

Copilot review overview

🟢 Approval recommended

The deprecated declarations are removed consistently, remaining references are updated, and documented defaults are preserved.

Review effort: Balanced
Findings: None

What changed in this PR

Removes APIs deprecated ahead of 1.0 while preserving default Gemini and llama.cpp behavior.

Changes:

  • Removes deprecated error alias and legacy Gemini/Llama APIs.
  • Updates tests to use replacement APIs.
  • Refreshes dependency resolution pins.
File Description
Sources/​AnyLanguageModel/​Generable.swift Removes deprecated error alias.
Sources/​AnyLanguageModel/​Models/​GeminiLanguageModel.swift Removes legacy configuration APIs and retains defaults.
Sources/​AnyLanguageModel/​Models/​LlamaLanguageModel.swift Removes legacy initializer and properties.
Tests/​AnyLanguageModelTests/​GeneratedContentErrorTests.swift Tests the current error type directly.
Tests/​AnyLanguageModelTests/​LlamaLanguageModelTests.swift Removes tests for deleted APIs.
Package.resolved Adds resolved optional dependency pins.

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

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