feat: add embeddings endpoint and config for OpenAI-compatible text embeddings via gateway
Add POST /openai/v1/embeddings route in openai_gateway router, new config fields for embedding upstream URL/model/key/enabled toggle with defaults pointing to OpenRouter Qwen3 8B, INTERNAL_EMBED_MODEL constant in config.py, documentation in docs_api.py and README.md describing the molodetz~embed model mapping, and embed-call tracking in gateway metrics alongside existing chat/vision counters.
This commit is contained in:
@@ -53,6 +53,7 @@ INTERNAL_BASE_URL = environ.get(
|
||||
).rstrip("/")
|
||||
INTERNAL_GATEWAY_URL = f"{INTERNAL_BASE_URL}/openai/v1/chat/completions"
|
||||
INTERNAL_MODEL = "molodetz"
|
||||
INTERNAL_EMBED_MODEL = "molodetz~embed"
|
||||
|
||||
SERVICE_LOCK_FILE = LOCKS_DIR / "devplace-services.lock"
|
||||
INIT_LOCK_FILE = LOCKS_DIR / "devplace-init.lock"
|
||||
|
||||
Reference in New Issue
Block a user