确定性路由工具自动在本地和托管 LLM 间切换,降低成本和延迟,解决模型选择的常见痛点。
Wayfinder 是一款本地优先的模型路由器,也是一套原生 Apple AI 环境。它会在本地为每个请求评分,选择符合条件的目标,并将交付策略与发起请求的应用程序分离。
生产环境使用的路由器以 Rust 实现。Wayfinder Desktop 将该路由器嵌入已签名的应用程序包中,无需 Python runtime、package 或 fallback。
原生 Swift macOS 应用提供:
Desktop 版本遵循 SemVer,并使用 desktop-v* tag。详见 macos/WayfinderMac/Packaging/RELEASE.md。
计划在 v0.2.0 推出原生、独立运行的 iPhone 和 iPad 应用。它们会嵌入同一个权威的 Rust 路由核心,并直接调用获准使用的端侧 provider 或云端 provider,无需依赖 Mac 或 localhost gateway。v0.2.1 将在此基础上支持可选的 Mac 配对,将 Mac 作为额外的 provider。
相关治理契约包括 WF-ROADMAP-0016、WF-ADR-0047 和 WF-ADR-0048。移动端对话持久化由 WF-ADR-0049 规范。以 thread 为先的移动端交互契约为 WF-DESIGN-0020。
Rust workspace 包含确定性评分核心、配置解析器、provider client、资源受限的 HTTP gateway、服务集成、原生 XPC client,以及命令行辅助工具。
cargo build \
--manifest-path rust/Cargo.toml \
--package wayfinder-cli \
--bin wayfinder-router \
--locked
rust/target/debug/wayfinder-router route "Summarise this request"
rust/target/debug/wayfinder-router serve --host 127.0.0.1 --port 8088
OpenAI-compatible:http://127.0.0.1:8088/v1
Anthropic-compatible:http://127.0.0.1:8088
Health:http://127.0.0.1:8088/healthz
评分决策始终在离线环境中完成,具有确定性,并且不需要密钥。只有在路由选定之后,系统才会为实际交付解析凭证。
docker build -t wayfinder-router .
docker run --rm -p 8088:8088 \
-v "$PWD/wayfinder-router.toml:/data/wayfinder-router.toml:ro" \
wayfinder-router
该镜像基于 Rust workspace 构建,只包含原生 gateway 及其运行时证书。
cargo fmt --manifest-path rust/Cargo.toml --all -- --check
cargo test --manifest-path rust/Cargo.toml --workspace --all-features --locked
cargo clippy --manifest-path rust/Cargo.toml \
--workspace --all-targets --all-features --locked -- -D warnings
swift test --package-path macos/WayfinderMac
node clients/shared/test/parity.mjs
rust/ native router, gateway, providers, and service crates
apple/ planned shared Apple packages after bridge validation
ios/ planned native iPhone and iPad product
macos/WayfinderMac/ native Swift macOS app and release packaging
clients/ retained thin-client contract code and fixtures
decisions/ architecture decisions
designs/ product and interaction contracts
roadmaps/ delivery plans and closeout records
docs/ operational and release documentation
Wayfinder 采用 Apache-2.0 许可证。