Skip to content

Route default Foundation Models through Conduit#71

Merged
christopherkarani merged 2 commits intomainfrom
fix-default-fm-runtime
Apr 8, 2026
Merged

Route default Foundation Models through Conduit#71
christopherkarani merged 2 commits intomainfrom
fix-default-fm-runtime

Conversation

@christopherkarani
Copy link
Copy Markdown
Owner

Summary

  • route the default Foundation Models provider path through the released Conduit runtime instead of the old private LanguageModelSession wrapper
  • stop advertising streaming tool-call capability for the Foundation Models-backed Conduit path
  • fix the MCP server service tests for the current MCP SDK text payload shape

Verification

  • swift test --filter 'AgentDefaultInferenceProviderTests|ConduitProviderSelectionTests|InferenceProviderCertificationTests'\n- swift test

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ae1df632f

ℹ️ 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".

Comment on lines +180 to +184
let bridge = ConduitInferenceProvider(
provider: provider,
model: .foundationModels,
supportsStreamingToolCalls: false
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Disable tool-call streaming path, not just capability flag

Setting supportsStreamingToolCalls: false here only changes reported capabilities; it does not prevent the provider from being treated as a streaming tool-call provider. ConduitInferenceProvider still conforms to ToolCallStreaming*, and Agent.executeToolCallingLoop decides useToolStreaming from protocol conformance (see Agent.swift around structuredToolStreamingProvider/promptToolStreamingProvider), so the default Foundation Models route will still enter generateWithToolsStreaming whenever streaming+observer are enabled. That means the new Foundation Models default can still take the streaming path you intended to disable, which can drop tool execution if streaming tool-call completion events are unavailable.

Useful? React with 👍 / 👎.

@christopherkarani christopherkarani merged commit 0a3ac4d into main Apr 8, 2026
0 of 4 checks passed
@christopherkarani christopherkarani deleted the fix-default-fm-runtime branch April 8, 2026 17:14
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.

1 participant