Skip to content

Conversation

@akshaydeo
Copy link
Contributor

@akshaydeo akshaydeo commented Dec 25, 2025

Summary

Update Bifrost schema references in OpenAPI specification to use the more specific BifrostResponseExtraFields schema instead of the generic BifrostExtraFields.

Changes

  • Replaced all references to BifrostExtraFields with BifrostResponseExtraFields in the OpenAPI schema
  • This change ensures more accurate API documentation by using the correct schema reference for response objects

Type of change

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

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (Next.js)
  • Docs

How to test

Verify that the OpenAPI schema is valid and correctly references the BifrostResponseExtraFields schema:

# Validate OpenAPI schema
npx @apidevtools/swagger-cli validate docs/apis/openapi.json

Breaking changes

  • Yes
  • No

Related issues

N/A

Security considerations

No security implications as this is a documentation-only change.

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
Contributor

coderabbitai bot commented Dec 25, 2025

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Updated API response schemas for batch operations (create, list, retrieve, cancel, results) and file operations (upload, list, retrieve, delete) to include expanded metadata fields in responses.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

The pull request updates the OpenAPI specification by changing the extra_fields type reference from BifrostExtraFields to BifrostResponseExtraFields across nine response schemas (Batch and File operations) in the generated API documentation.

Changes

Cohort / File(s) Summary
OpenAPI Schema Reference Updates
docs/apis/openapi.json
Updated extra_fields property type reference from BifrostExtraFields to BifrostResponseExtraFields in 9 response schemas: BatchCreateResponse, BatchListResponse, BatchRetrieveResponse, BatchCancelResponse, BatchResultsResponse, FileUploadResponse, FileListResponse, FileRetrieveResponse, and FileDeleteResponse

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A schema update hops along,
Nine references now sing a new song,
Extra fields, renamed with care,
Response data now matches the pair!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: updating the OpenAPI specification for extra fields schema references.
Description check ✅ Passed The description follows the repository template with all major sections completed, including Summary, Changes, Type of change, Affected areas, How to test, Breaking changes, and Security considerations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 12-25-fixes_openapi_spec_for_extra_fields

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7aa438b and 6bfbd45.

📒 Files selected for processing (1)
  • docs/apis/openapi.json
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

always check the stack if there is one for the current PR. do not give localized reviews for the PR, always see all changes in the light of the whole stack of PRs (if there is a stack, if there is no stack you can continue to make localized suggestions/reviews)

Files:

  • docs/apis/openapi.json
🔇 Additional comments (2)
docs/apis/openapi.json (2)

8591-8634: Batch response extra_fields now consistently use the response-specific schema

BatchCreateResponse, BatchListResponse, BatchRetrieveResponse, BatchCancelResponse, and BatchResultsResponse all now reference #/components/schemas/BifrostResponseExtraFields for extra_fields, matching BifrostResponse and CountTokensResponse. This keeps metadata shape uniform across batch and non-batch responses and avoids any dangling reference to an older BifrostExtraFields schema.

Looks correct and internally consistent with the existing BifrostResponseExtraFields definition.

Also applies to: 8635-8660, 8661-8711, 8712-8734, 8735-8754


8802-8843: File response extra_fields also aligned with BifrostResponseExtraFields

FileUploadResponse, FileListResponse, FileRetrieveResponse, and FileDeleteResponse now all point extra_fields to #/components/schemas/BifrostResponseExtraFields, reusing the same provider/latency/usage/raw-response metadata envelope as core responses.

This makes the OpenAPI surface more predictable for clients consuming these file endpoints. No issues spotted.

Also applies to: 8844-8863, 8864-8898, 8899-8915


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

Copy link
Contributor Author

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

@github-actions
Copy link
Contributor

🧪 Test Suite Available

This PR can be tested by a repository admin.

Run tests for PR #1175

@akshaydeo akshaydeo marked this pull request as ready for review December 25, 2025 14:56
Copy link
Contributor Author

akshaydeo commented Dec 25, 2025

Merge activity

  • Dec 25, 3:13 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Dec 25, 3:13 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo akshaydeo merged commit 842e03a into main Dec 25, 2025
11 checks passed
@akshaydeo akshaydeo deleted the 12-25-fixes_openapi_spec_for_extra_fields branch December 25, 2025 15:13
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