huanghuang0913 commented on issue #12776: URL: https://github.com/apache/apisix/issues/12776#issuecomment-3578278149
I can not use proxy-rewrite, since prometheus plugin only shows apisix_llm_completion_tokens from ai-proxy plugin? I want to count token usage via APISIX Prometheus metrics, but the metric apisix_llm_completion_tokens does not appear in the metrics information when I use proxy-rewrite instead of ai_proxy. curl "http://127.0.0.1:9180/apisix/admin/routes/ai-proxy-route-DeepSeek-R1" -X PUT \ -H "X-API-KEY: ${admin_key}" \ -d '{ "id": "ai-proxy-route-DeepSeek-R1", "name": "DeepSeek-R1", "uri": "/deepseek-r1/chat/completions", "methods": ["POST"], "plugins": { "proxy-rewrite": { "uri": "/v1/chat/completions", "host": "10.103.43.62:1025", "headers": { "Authorization": "Bearer '"$DEEPSEEK_API_KEY"'", "Content-Type": "application/json" } }, "prometheus": {} }, "upstream": { "nodes": { "<our ip>:<our port>": 1 }, "type": "roundrobin", "timeout": { "connect": 60, "send": 60, "read": 300 } } }' -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
