Skip to content

feat(ai-service): expose model and provider metadata endpoint #769 - #865

Open
oyetunde140 wants to merge 2 commits into
Pulsefy:mainfrom
oyetunde140:feat/expose-model-provider-metadata
Open

feat(ai-service): expose model and provider metadata endpoint #769#865
oyetunde140 wants to merge 2 commits into
Pulsefy:mainfrom
oyetunde140:feat/expose-model-provider-metadata

Conversation

@oyetunde140

Copy link
Copy Markdown

Overview

This PR adds a safe metadata endpoint (/v1/ai/metadata) that reports active AI providers, model versions, and capability flags for debugging and integration checks. The endpoint intentionally excludes all secrets and private credentials.

Related Issue

Closes #769

Changes

📋 Metadata Endpoint

  • [ADD] app/ai-service/api/v1/metadata.py

    • GET /v1/ai/metadata returns provider, model versions, capability flags, and runtime info
    • Excludes API keys, signing secrets, tokens, and all credentials
    • Includes _links to health and dependency check endpoints
  • [MODIFY] app/ai-service/api/v1/router.py

    • Register new metadata router in the v1 router
  • [MODIFY] app/ai-service/main.py

    • Legacy 308 redirect from /ai/metadata to /v1/ai/metadata
    • Root endpoint includes metadata link field
  • [ADD] app/ai-service/test_main.py

    • Structure and contract validation
    • Secrets blacklist verification
    • Legacy redirect tests (308 status + followed redirect)
    • Root metadata link test

Verification Results

pytest test_main.py -v
✅ 19/19 passed (14 existing + 5 new metadata tests)
Acceptance Criteria Status
Endpoint excludes secrets and private credentials ✅ Secrets blacklist test passes; no api_key, secret, or token fields in response
Response includes provider and model identifiers currently in use ✅ provider.active, provider.configured, models fields present
Health or diagnostics surfaces can link to the metadata output ✅ Root endpoint includes metadata link; response includes _links to health and dependencies

Add a safe /v1/ai/metadata endpoint that reports active AI providers,
configured model versions, and capability flags for debugging and
integration checks. Secrets and private credentials are excluded.

- New GET /v1/ai/metadata route in api/v1/metadata.py
- Legacy 308 redirect from /ai/metadata -> /v1/ai/metadata
- Root endpoint includes metadata link
- Comprehensive test coverage for structure, secrets safety,
  and legacy redirect

Closes Pulsefy#769

Co-authored-by: Cursor <cursoragent@cursor.com>
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@oyetunde140 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Cedarich

Copy link
Copy Markdown
Contributor

Kindly resolve conflicts

@Cedarich

Copy link
Copy Markdown
Contributor

@oyetunde140 kindly fix CI

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose Model and Provider Metadata Endpoint

2 participants