Feat/meta first party provider - #83
Open
Zeptiny wants to merge 3 commits into
Open
Conversation
Adds a code-owned Meta driver (api.meta.ai/v1, openai-responses protocol) backed by @ai-sdk/openai's Responses adapter, plus the facet wiring and catalog seeding needed to run Muse Spark models as a first-party provider: - META_THINKING_POLICY: summary exposure with always-on stateless encrypted replay (store: false + include reasoning.encrypted_content) so tool loops keep chain-of-thought without server-side conversation state - buildReasoningOptions validates the documented effort vocabulary (minimal..xhigh); none/max/numeric are rejected like the API does - Cache facet rides prompt_cache_retention (in_memory | 24h) via a new retentionHint on the cache facet; cacheTtlLabelSchema accepts in_memory - Trust policy pins meta to openai-responses with thinking+cache facets; catalog reseeded surgically with the three muse-spark models Full unit suite (3364 tests), typecheck, lint, and runtime-cycle checks pass.
Meta's Responses API rejects replayed inputs where a reasoning item is not followed by an assistant message or function_call (HTTP 400), and rejects assistant text replayed as a plain final answer immediately before a function_call. Two replay-path fixes, gated to openai-responses protocol: - toModelMessages tags assistant text that precedes tool calls with openai.phase: "commentary" so the Responses adapter re-emits the message item with its phase (Meta drops/interprets such text as final otherwise) - a reasoning-only turn (cancelled mid-thought, text-less artifact) now gets a minimal assistant message inserted after the reasoning item, the provider-documented workaround, instead of leaving reasoning directly before a user message ThinkingReplayContext carries the frozen model protocol; send.ts and subagent-runner.ts populate it from the request snapshot, and the orchestrator enables the Responses rules only for openai-responses models.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The integration gate asserting the complete shipped provider set failed CI once the Meta provider was seeded into the bundled catalog. Adds meta to the expected id list; the fixture-based seed test is unaffected because its minimal models.dev capture has no meta entry.
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.
No description provided.