feat: production-level reliability, observability, and OpenAI compatibility improvements - #90
Merged
Merged
Conversation
… precision inference
Owner
Author
🧪 実動作検証エビデンス (Live Execution Evidence)本PRに含まれる主要機能の実動テストおよび目視確認結果です。全174件の自動テストが通過していることに加え、実リクエストによる各エンドポイントの挙動を確認済みです。 1. レートリミット (429 Too Many Requests & Retry-After)HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 60
{"detail": "Too Many Requests"}2. グレースフルシャットダウン (503 Service Unavailable)HTTP/1.1 503 Service Unavailable
Content-Type: application/json
{"detail": "Server is shutting down. Please retry shortly."}3. OpenAI 互換 dimensions (L2正規化) & base64{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": "3/n5v+O75T7b0wU/",
"index": 0
}
],
"model": "cl-nagoya/ruri-v3-small"
}
4. Prometheus メトリクス (/metrics) |
Owner
Author
🚀 追加実装・検証完了報告 (Commit: 2b3099f)Jules との並行実行タスクを統合し、プロダクション向けインフラ定義および API ドキュメンテーションの強化を実施しました。 1. Kubernetes 本番デプロイメントマニフェスト (
|
…ent authentication
Owner
Author
🚀 追加実装・検証完了報告 (Commit: de0b758)ご指示いただいた4項目(不要ブランチ削除、推論セマフォ制御、マルチAPIキー認証、高並行負荷テスト)を完了しました。 1. 不要なリモートブランチの整理・削除 (GitHub)
2. 推論同時実行数のセマフォ制御 (
|
…enAPI documentation
Owner
Author
🚀 追加検証・リファクタ完了報告 (Commit: a0852d7)Jules セッション 1. Jules セッション
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request brings comprehensive production-grade improvements to the embedding and reranking API service.
Key Enhancements
GET /v1/modelslisting embedding and reranking models (ModelList,ModelCard).dimensionsparameter for Matryoshka models with automatic L2 re-normalization.encoding_format="base64"(IEEE 754 float32 little-endian)./health//healthz(Liveness) and/ready(Readiness probe verifying GPU & loaded models).SHUTDOWN_DRAIN_TIMEOUT_SECONDS), rejecting incoming requests with503 Service Unavailableduring draining.POST /v1/models/unload) with GPU memory and GC reclamation.PRELOAD_MODELSstartup option to eliminate cold-start latency.X-Request-IDcorrelation across ContextVars./metrics) with request counts, latency histograms, token usage (http_prompt_tokens_total), and batch size distribution (http_request_batch_size).MAX_PAYLOAD_SIZE = 32MB, returning413 Payload Too Large).RateLimitermiddleware (RATE_LIMIT_PER_MINUTE, returning429 Too Many RequestswithRetry-After).SafeNetworkBackendIP pinning.uv audit,gitleaks, and repo-wide linting in GitHub Actions CI.httpx.AsyncClient.VisualizedBGEEmbeddingModel.encode_multimodal.TORCH_DTYPE(bfloat16,float16,float32) andtorch.autocast.Test Coverage