Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Streaming context propagation, callback error policy, and protected continuation history have unresolved correctness issues.
3 open findings
What changed in this PR
Implements and documents Foundation Models 27-compatible dynamic profiles, session properties, request options, and provider Tool continuations.
Changes:
- Adds dynamic profile composition, lifecycle callbacks, session properties, and request options.
- Supports profile reevaluation and model handoff across remote providers.
- Adds compatibility, lifecycle, continuation, and serialization tests plus README guidance.
| File | Description |
|---|---|
Tests/AnyLanguageModelTests/SessionPropertyTests.swift |
Tests session properties and history behavior. |
Tests/AnyLanguageModelTests/RequestOptionsTests.swift |
Tests request-option compatibility. |
Tests/AnyLanguageModelTests/ProviderUsageTests.swift |
Tests provider profile continuations. |
Tests/AnyLanguageModelTests/FoundationModelsGenerationOptionsTests.swift |
Tests Foundation Models option bridging. |
Tests/AnyLanguageModelTests/DynamicProfileTests.swift |
Tests profiles and lifecycle behavior. |
Tests/AnyLanguageModelTests/APICompatibilityFoundationModelsTests.swift |
Checks Foundation Models API compatibility. |
Tests/AnyLanguageModelTests/APICompatibilityAnyLanguageModelTests.swift |
Checks AnyLanguageModel compatibility. |
Tests/AnyLanguageModelTests/AnthropicReasoningTests.swift |
Covers non-streaming Anthropic continuation. |
Sources/AnyLanguageModelMacros/SessionPropertyEntryMacro.swift |
Generates session-property storage accessors. |
Sources/AnyLanguageModelMacros/Plugin.swift |
Registers the new macro. |
Sources/AnyLanguageModel/SessionProperties.swift |
Implements session-scoped properties and history. |
Sources/AnyLanguageModel/ProfileToolExecution.swift |
Centralizes profile-aware Tool execution and handoff. |
Sources/AnyLanguageModel/Models/SystemLanguageModel.swift |
Bridges Tool-calling mode. |
Sources/AnyLanguageModel/Models/OpenResponsesLanguageModel.swift |
Adds profile-aware continuations. |
Sources/AnyLanguageModel/Models/OpenAILanguageModel.swift |
Adds profile-aware continuations. |
Sources/AnyLanguageModel/Models/OllamaLanguageModel.swift |
Adds multi-round profile continuations. |
Sources/AnyLanguageModel/Models/GeminiLanguageModel.swift |
Adds profile-aware continuations. |
Sources/AnyLanguageModel/Models/AnthropicLanguageModel.swift |
Adds non-streaming Tool continuations. |
Sources/AnyLanguageModel/LanguageModelSession.swift |
Integrates profile resolution and callbacks. |
Sources/AnyLanguageModel/GenerationOptions.swift |
Adds OS 27-compatible options. |
Sources/AnyLanguageModel/DynamicProfile.swift |
Defines dynamic profile composition. |
Sources/AnyLanguageModel/DynamicInstructions.swift |
Exposes instruction resolution internally. |
Sources/AnyLanguageModel/ContextOptions.swift |
Defines request-context options. |
README.md |
Documents request options and profiles. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…pstream-dynamic-profile-docs
| currentRoundEntries: [Transcript.Entry] | ||
| ) async throws { | ||
| guard let profile = requestContext.profile else { return } | ||
| let history = requestContext.canonicalTranscript + currentRoundEntries |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Stack
This documentation PR depends on #315 and therefore #314, #311, and #313. After those merge, the documentation-only change is commit
b9738ab.Verification
git diff --check