f512d94c74
git-subtree-dir: clients/ds-app git-subtree-mainline:a24e3e6f22git-subtree-split:5206cf3b0c
28 lines
1.4 KiB
Swift
28 lines
1.4 KiB
Swift
// SpecializedProvider.swift — S2 scaffold (GPU 특화 통로: rerank / embed / vision / OCR).
|
|
//
|
|
// 이번 PR = **scaffold-only**: isAvailable=false, complete→notImplemented(.specialized). HTTP client/API key/cost = 0.
|
|
// 목적: 라우터 .vision 체인 [.specialized, .onDevice] 에서 specialized 가 **dict 에 부재 → 침묵 continue** 하던 것을,
|
|
// 등록된 명시-불가 provider 로 바꿔 폴백을 **가시화**(라우터가 'specialized unavailable → onDevice' log).
|
|
//
|
|
// 실 vision 통합 = backend 확정 + fixture 캡처 후 **별 PR**(결정 #1):
|
|
// 후보 = MacBook M5 Max Qwen VLM http://100.118.112.84:8810 (OpenAI 호환, wake-on-call) — 패브릭 내 유일 생성형 VLM.
|
|
// GPU Ollama 는 embedding(bge-m3) 전용이라 생성형 vision 아님.
|
|
import Foundation
|
|
|
|
public struct SpecializedProvider: AIProvider {
|
|
public let id: AIProviderID = .specialized
|
|
|
|
public init() {}
|
|
|
|
/// scaffold — 미구현. 라우터가 가시 폴백하도록 정직하게 false.
|
|
public var isAvailable: Bool {
|
|
get async { false }
|
|
}
|
|
|
|
public func complete(_ request: AICompletionRequest) async throws -> AICompletionResponse {
|
|
// 침묵 nil-skip 금지 — 명시 notImplemented 로 vision-chain 폴백을 가시화.
|
|
// TODO(vision): .specialized → M5 Max Qwen VLM(:8810, wake-on-call) 실 call-shape + fixture 후 별 PR.
|
|
throw AIProviderError.notImplemented(id)
|
|
}
|
|
}
|