docs(common): acces Bifrost partage (header x-bf-vk, vision gemini, DeepSeek text-only)
Reference transverse aux 3 instances Hermes, issue du projet gsparc-mezzouna. Pieges cles : auth via x-bf-vk (pas Bearer), DeepSeek = text-only (404 sur image), modele vision = openrouter/google/gemini-2.5-flash. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
c2b691e403
commit
5f18609cb6
|
|
@ -6,6 +6,11 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## common (infra partagee, transverse aux 3 instances)
|
||||||
|
| Runbook | Date | Tags |
|
||||||
|
|---------|------|------|
|
||||||
|
| [Acces Bifrost (passerelle LLM, vision/OCR)](common/bifrost-access.md) | 2026-06-14 | infra, bifrost, llm, vision, x-bf-vk |
|
||||||
|
|
||||||
## hermes-perso
|
## hermes-perso
|
||||||
| Runbook | Date | Tags |
|
| Runbook | Date | Tags |
|
||||||
|---------|------|------|
|
|---------|------|------|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
# BIFROST-ACCESS — Passerelle LLM (vision / OCR)
|
||||||
|
|
||||||
|
Note partagée aux 3 instances Hermes. Source : projet gsparc-mezzouna, 2026-06-14.
|
||||||
|
|
||||||
|
Bifrost = passerelle LLM OpenAI-compatible sur le NAS.
|
||||||
|
|
||||||
|
## Endpoint & authentification
|
||||||
|
- Conteneur `bifrost` sur le réseau **n8n**, port interne **8080**.
|
||||||
|
- Depuis un conteneur du réseau n8n : `http://bifrost:8080/v1`
|
||||||
|
- Depuis le LAN : `http://192.168.100.33:3085/v1` (UI sur 3085)
|
||||||
|
- **Auth = header `x-bf-vk: <clé virtuelle>`**. Le header `Authorization: Bearer` est REJETÉ (HTTP 401 `virtual_key_required`). Toujours envoyer `x-bf-vk`.
|
||||||
|
- Clé virtuelle commune (Nabil-Key, budget 8 $/mois) : `bfk-e5832bfebd22e9d8252a426d0734ed5f2d923204c8033d6d`.
|
||||||
|
- `GET /v1/models` (avec `x-bf-vk`) → liste des modèles (ids complets, ex. `openrouter/google/gemini-2.5-flash`).
|
||||||
|
|
||||||
|
## PIÈGE vision / OCR
|
||||||
|
**DeepSeek est text-only.** Envoyer une image à `deepseek-v4-flash/pro/r1` → `404 "No endpoints found that support image input"`.
|
||||||
|
→ Pour toute extraction d'image (scan, ticket, OCR), utiliser un modèle vision :
|
||||||
|
**`openrouter/google/gemini-2.5-flash`** (rapide, fiable, payant ~fraction de centime/image).
|
||||||
|
Le « forfait OpenCode gratuit » ne couvre PAS la vision.
|
||||||
|
|
||||||
|
## Exemple
|
||||||
|
```bash
|
||||||
|
curl -s http://bifrost:8080/v1/chat/completions \
|
||||||
|
-H "x-bf-vk: bfk-e5832bfebd22e9d8252a426d0734ed5f2d923204c8033d6d" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"model":"openrouter/google/gemini-2.5-flash","messages":[
|
||||||
|
{"role":"user","content":[
|
||||||
|
{"type":"text","text":"Décris cette image en JSON strict."},
|
||||||
|
{"type":"image_url","image_url":{"url":"data:image/jpeg;base64,..."}}]}]}'
|
||||||
|
```
|
||||||
|
Implémentation de référence : `gsparc-mezzouna/app/vision.py`.
|
||||||
Loading…
Reference in New Issue