Skip to content

Groq provider: 404 for non-Enterprise keys, and metrics URL doesn't match Groq docs #606

Description

@thelogicmatrix

Version: 0.60.3 (Windows)

1. Raw 404 for non-Enterprise keys

With a standard (non-Enterprise) Groq API key, the Groq card shows Groq metrics API returned status 404 Not Found. codexbar-cli diagnose --provider groq reports the same error with category unknown.

Groq's Prometheus metrics are Enterprise-only (https://console.groq.com/docs/prometheus-metrics), so for most users the card can never load and the error looks like a bug. Suggest mapping this 404 to a clear message such as "Groq usage metrics require an Enterprise plan", or marking the provider unavailable.

2. Request path looks wrong for Enterprise users too

Groq documents the query endpoint as https://api.groq.com/v1/metrics/prometheus (so /v1/metrics/prometheus/api/v1/query). In rust/src/providers/groq/mod.rs, GROQ_API_BASE is https://api.groq.com/openai/v1 with no trailing slash, and Url::join("metrics/prometheus/api/v1/query") replaces the last segment. The actual request goes to https://api.groq.com/openai/metrics/prometheus/api/v1/query. I can't confirm this with an Enterprise key, but it doesn't match either the docs or the apparent intent. A dedicated base like https://api.groq.com/v1/ (with trailing slash) would fix it.

Optional: for non-Enterprise keys, the card could fall back to the x-ratelimit-* headers Groq returns on API responses (https://console.groq.com/docs/rate-limits) and show remaining requests and tokens.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions