feat: Anthropic provider/inbound + embeddings

- Anthropic outbound provider: /v1/messages, system extraction, x-api-key +
  anthropic-version; streaming translates Anthropic SSE -> unified OpenAI wire format
- Anthropic inbound adapter (POST /v1/messages): non-streaming JSON + streaming SSE
  (OpenAI -> Anthropic event translation)
- Embeddings: POST /v1/embeddings inbound + Provider::embed(); embedding models
  resolvable from the pool (registry no longer skips them)
- protocols mounted always, gated on live flags; admin meta marks them implemented
This commit is contained in:
infosave2007
2026-06-30 16:50:22 +03:00
parent 70d8cde258
commit bf8534f13d
9 changed files with 528 additions and 24 deletions
-3
View File
@@ -15,9 +15,6 @@ impl Registry {
pub fn from_config(cfg: &Config, secrets: &SecretStore) -> anyhow::Result<Self> {
let mut by_id: HashMap<String, Arc<dyn Provider>> = HashMap::new();
for m in &cfg.models {
if m.kind == "embedding" {
continue; // embedding models are handled by a separate branch (v0.1)
}
// provider key: secret store → environment variable
let api_key = m
.api_key_env