Evaluate: Cross-provider context serialisation for ADF multi-model routing
まだ誰も着手していません。
評価
調査の方向性
Start by reading terraphim-ai/crates/terraphim_orchestrator/src/routing.rs and the referenced Pi cross-provider handoff implementation. Review the listed ADF routing scenarios and provider formats, then prototype the Anthropic Messages API ↔ OpenAI Chat Completions API conversion and measure round-trip context loss. Done means documenting the scenarios and a rationale to implement, defer, or reject the approach.
索引モデルが issue の本文から書いたものです。
説明
Parent Epic
#682 -- Evaluate Pi architectural patterns
Pattern
Pi's pi-ai layer supports cross-provider handoffs: switch models mid-session while serialising conversation context across different provider formats (Anthropic, OpenAI, Google, etc.). Context serialisation handles format differences transparently.
Current State
ADF (terraphim_orchestrator) routes different agents to different models via RoutingEngine:
fastest-> Cerebras llama-3.3-70b (~300ms)think-> z.ai GLM-5 (reasoning)general-> z.ai GLM-4.7default-> Claude viaclaude -p
However, each agent runs in isolation. There is no mechanism to:
- Hand off context from one model to another mid-task
- Serialise a conversation from Claude format to OpenAI format for a second opinion
- Use a cheaper model for initial analysis then escalate to a more capable model with the same context
Evaluation Questions
- Is cross-provider handoff valuable for ADF? Current agents are independent. Would "start with Cerebras, escalate to Claude" improve cost/quality?
- What does context serialisation look like in Rust? Pi does this in TypeScript. Rust implementation would need serde-based format converters for each provider's message schema.
- Does this conflict with the Agent SDK direction? If we migrate ADF to Agent SDK (#682 context), we're locked to Claude. Cross-provider would only apply to non-SDK agents.
- What's the minimal viable implementation? E.g., Anthropic <-> OpenAI message format converter as a standalone function.
Acceptance Criteria
- Identify 2-3 concrete ADF scenarios where cross-provider handoff would improve outcomes
- Prototype message format converter: Anthropic Messages API <-> OpenAI Chat Completions API
- Measure context loss (if any) during serialisation round-trip
- Decision: implement, defer, or reject with rationale
References
- Pi cross-provider handoffs: https://github.com/badlogic/pi-mono/tree/main/packages/ai (see "Cross-Provider Handoffs" section)
- ADF RoutingEngine: terraphim-ai/crates/terraphim_orchestrator/src/routing.rs
- terraphim_llm_proxy model routing: /etc/terraphim-llm-proxy/config.toml
- 主要言語
- Rust
- スター
- 62
- フォーク
- 5
- 平均マージ
- 2時間 27分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
terraphim/terraphim-ai のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
terraphim/terraphim-ai#885 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
terraphim/terraphim-ai#871 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
terraphim/terraphim-ai#810 · コメント 2 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
terraphim/terraphim-ai#729 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
terraphim/terraphim-ai#728 ·
terraphim/terraphim-ai の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
bug core
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW オープンfuzz
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ClickHouse/ClickHouse#122114 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
linebender/vello_svg#90 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100