Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

Addresses review feedback to separate HTTP API definitions from general modules. The api module should only contain HTTP route handlers, relying on other modules for shared types.

Changes

  • New crate::ai module: Moved provider configuration types (AuthMethod, ProviderConfig, ProviderConfigBuilder) from api/ai/provider.rs to ai/provider.rs
  • Flattened API module: Converted api/ai/ directory to single api/ai.rs file that imports from crate::ai
// Before: api/ai/mod.rs
mod provider;
pub use provider::{AuthMethod, ProviderConfig, ProviderConfigBuilder};

// After: api/ai.rs
use crate::ai::{AuthMethod, ProviderConfig, ProviderConfigBuilder};

This follows the established pattern where API modules are flat and delegate to general-purpose modules for shared functionality.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Base automatically changed from experimental-ai-gateway to master November 27, 2025 11:24
Co-authored-by: CBenoit <3809077+CBenoit@users.noreply.github.com>
@CBenoit CBenoit force-pushed the copilot/sub-pr-1588 branch from 6cb8942 to 838b101 Compare November 27, 2025 11:27
@CBenoit CBenoit changed the title [WIP] Update multi-provider AI Gateway module structure refactor(dgw): move AI provider module to crate::ai and flatten api/ai Nov 27, 2025
@CBenoit CBenoit marked this pull request as ready for review November 27, 2025 11:28
@CBenoit CBenoit enabled auto-merge (squash) November 27, 2025 11:28
Copilot AI requested a review from CBenoit November 27, 2025 11:31
@CBenoit CBenoit merged commit 737daaf into master Nov 27, 2025
40 checks passed
@CBenoit CBenoit deleted the copilot/sub-pr-1588 branch November 27, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants