Skip to content

feat: add model details endpoint#2803

Merged
akshaydeo merged 1 commit intov1.5.0from
04-17-fix_restore__api_models_details_endpoint
Apr 17, 2026
Merged

feat: add model details endpoint#2803
akshaydeo merged 1 commit intov1.5.0from
04-17-fix_restore__api_models_details_endpoint

Conversation

@BearTS
Copy link
Copy Markdown
Contributor

@BearTS BearTS commented Apr 17, 2026

Summary

Adds a new API endpoint /api/models/details to provide detailed model information through the HTTP transport layer.

Changes

  • Added new GET route /api/models/details that maps to the listModelDetails handler method
  • Route follows existing pattern with middleware chaining for consistent request processing

Type of change

  • Feature
  • Bug fix
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

Test the new endpoint by making a GET request to verify it returns model details:

# Test the new endpoint
curl -X GET http://localhost:8080/api/models/details

# Run existing tests to ensure no regressions
go test ./transports/bifrost-http/...

Screenshots/Recordings

N/A

Breaking changes

  • Yes
  • No

Related issues

Security considerations

The endpoint uses the same middleware chain as other model-related endpoints, maintaining consistent authentication and authorization patterns.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

📝 Walkthrough

Walkthrough

A single line was added to the ProviderHandler.RegisterRoutes method to register a new HTTP GET route for the "/api/models/details" endpoint, chaining to the existing listModelDetails handler.

Changes

Cohort / File(s) Summary
Route Registration
transports/bifrost-http/handlers/providers.go
Added HTTP GET route for "/api/models/details" endpoint mapped to the existing h.listModelDetails handler.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop and a skip, a route takes flight,
New details endpoint, gleaming so bright,
Models shall speak of their wonders with glee,
Details now accessible, easy and free! 🌟

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds a model details endpoint but does not address the Files API Support requirements from issue #123 (file uploads, RAG, fine-tuning). Verify if issue #123 is the correct linked issue for this PR. If so, implement file upload endpoints and RAG support as required by the issue.
Out of Scope Changes check ⚠️ Warning The code change (adding /api/models/details route) is within scope as a feature addition, but appears misaligned with the linked issue objective (Files API Support). Clarify the relationship between this PR and issue #123, or link the correct issue that relates to model details endpoint.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a new model details endpoint as a feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description follows the required template structure with all major sections completed: summary, changes, type of change, affected areas, how to test, breaking changes, security considerations, and checklist.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 04-17-fix_restore__api_models_details_endpoint

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor Author

BearTS commented Apr 17, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@BearTS BearTS marked this pull request as ready for review April 17, 2026 13:26
@BearTS BearTS changed the title fix: restore /api/models/details endpoint feat: add model details endpoint Apr 17, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 17, 2026

Confidence Score: 5/5

Safe to merge — minimal, focused fix that restores a missing endpoint with no logic changes to existing paths.

The change adds back a previously working route and its handler. The implementation correctly reuses shared helpers (listManagementModels, parseModelListQuery), guards against a nil catalog, and delegates to the thread-safe GetModelCapabilityEntryForModel. No existing behavior is altered and there are no P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
transports/bifrost-http/handlers/providers.go Restores /api/models/details route registration and listModelDetails handler; implementation correctly follows the same patterns as listModels, with catalog nil-guard and thread-safe metadata enrichment via GetModelCapabilityEntryForModel.

Reviews (1): Last reviewed commit: "fix: restore /api/models/details endpoin..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

akshaydeo commented Apr 17, 2026

Merge activity

  • Apr 17, 5:15 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 17, 5:15 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo akshaydeo merged commit f2687a2 into v1.5.0 Apr 17, 2026
17 of 18 checks passed
@akshaydeo akshaydeo deleted the 04-17-fix_restore__api_models_details_endpoint branch April 17, 2026 17:15
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.

2 participants