Skip to content

feat(api): add provider and model route admin endpoints#33

Merged
wauputr4 merged 5 commits into
mainfrom
codex-phase-1-checkpoint
May 10, 2026
Merged

feat(api): add provider and model route admin endpoints#33
wauputr4 merged 5 commits into
mainfrom
codex-phase-1-checkpoint

Conversation

@wauputr4
Copy link
Copy Markdown
Contributor

Summary

  • Add provider and model routing API surface under mizan-api.
  • Add public OpenAI-compatible GET /v1/models endpoint for exposed model routes.
  • Add admin endpoints for provider connections and model routes CRUD operations.
  • Add middleware guard for admin-only routes.
  • Keep SQL generation backend-agnostic with sqlite/postgres parameter placeholder conversion.

Verification

  • cargo fmt --all
  • cargo check --workspace
  • cargo test --workspace

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new providers module to manage model routes and provider connections, adding several API endpoints for listing, creating, and deleting these resources. Key feedback includes a bug in the to_dollar_params utility that incorrectly handles question marks within string literals, a security risk concerning the storage of provider secrets without server-side encryption, and the duplication of utility functions across modules. Furthermore, the review suggests parameterizing SQL status filters for better portability and adding validation for pricing fields to ensure they are non-negative.

Comment thread crates/mizan-api/src/providers.rs Outdated
Comment thread crates/mizan-api/src/providers.rs Outdated
Comment thread crates/mizan-api/src/providers.rs Outdated
Comment thread crates/mizan-api/src/providers.rs
Comment thread crates/mizan-api/src/providers.rs Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2689375ec0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/mizan-api/src/lib.rs Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c431916c4b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/mizan-api/src/gateway.rs
Comment thread crates/mizan-api/src/gateway.rs Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e83a4dc97

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/mizan-api/src/gateway.rs
Comment thread crates/mizan-api/src/gateway.rs
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b00b96813

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/mizan-api/src/utils.rs
@wauputr4 wauputr4 merged commit 1f195dd into main May 10, 2026
1 check passed
@wauputr4 wauputr4 deleted the codex-phase-1-checkpoint branch May 10, 2026 13:09
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.

1 participant