docs(providers): restructure into providers/ tree with cloud platforms group#323
Conversation
Extract the sub-domain types and helpers that had accumulated in
config/config.go (~750 lines) into one-file-per-domain siblings,
mirroring the existing cache.go / budget.go / fallback.go convention.
Each new file holds its domain's types and any helpers co-located:
server.go — ServerConfig, NormalizeBasePath, JoinBasePath,
body-size constants and parsing
models.go — ModelsConfig, ConfiguredProviderModelsMode helpers
storage.go — StorageConfig family, BackendConfig
guardrails.go — GuardrailsConfig, rules, prompt/altering settings
resilience.go — Retry/CircuitBreaker/ResilienceConfig + Raw* overlays
providers.go — RawProviderConfig
logging.go — LogConfig
usage.go — UsageConfig
admin.go — AdminConfig
http.go — HTTPConfig
workflows.go — WorkflowsConfig
metrics.go — MetricsConfig
config.go now holds only the top-level Config struct, LoadResult,
buildDefaultConfig, Load, and applyYAML.
Move-only refactor: no symbol renames, no behavior changes. All callers
across the 15+ packages that import gomodel/config keep their existing
imports unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…s group Move provider-specific guides from docs/guides/ to a dedicated docs/providers/ tree, split Google Gemini into AI Studio and Vertex AI pages, and add new pages for Amazon Bedrock, Azure OpenAI, and a providers overview. The Providers tab now groups the four cloud-hosted providers (Google Vertex AI, Amazon Bedrock, Azure OpenAI, Oracle GenAI) under a Cloud Platforms subsection with service-specific brand SVGs in docs/brand/. The overview page explains that dedicated guides exist only for providers whose setup involves non-obvious quirks (cloud-credential chains, deployment URLs, region/project requirements, native-vs-OpenAI-compatible API surfaces); the rest follow the standard "set the API key" pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR splits a large monolithic config file into many focused ChangesConfig package reorganization
Provider docs, navigation, and minor internal comment update
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR reorganizes provider documentation into a dedicated
Confidence Score: 5/5Safe to merge — changes are documentation restructuring and a mechanical config-file split with no behavioral impact. The config split is a pure file-organization refactor: all types, constants, and functions are moved verbatim between files in the same package. The docs changes are additive (new Bedrock, Azure, Vertex, Overview pages) plus clean relocations with all cross-references verified updated. No logic, API behavior, or runtime configuration defaults are altered. docs/providers/oracle.mdx has a "Current status" section placed mid-flow between numbered setup steps; worth tidying before merge but not blocking. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[docs/guides/ - OLD] --> B[guides/gemini.mdx DELETED]
A --> C[guides/oracle.mdx MOVED]
A --> D[guides/deepseek.mdx MOVED]
A --> E[guides/vllm.mdx MOVED]
A --> F[guides/multiple-ollama.mdx MOVED]
B --> G[providers/gemini.mdx - AI Studio]
B --> H[providers/vertex.mdx - Vertex AI NEW]
C --> I[providers/oracle.mdx]
D --> J[providers/deepseek.mdx]
E --> K[providers/vllm.mdx]
F --> L[providers/multiple-ollama.mdx]
M[NEW pages] --> N[providers/overview.mdx]
M --> O[providers/bedrock.mdx]
M --> P[providers/azure.mdx]
subgraph Providers Tab in docs.json
N
G
J
K
L
subgraph Cloud Platforms
H
O
P
I
end
end
|
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@config/storage.go`:
- Around line 49-51: The BackendConfig construction for PostgreSQL currently
copies c.PostgreSQL.MaxConns directly which leaves it 0 when unset; update
BackendConfig so when building storage.PostgreSQLConfig it applies the
documented default (10) if c.PostgreSQL.MaxConns is 0—e.g., compute a local
value (defaulting to 10) and assign that to MaxConns in storage.PostgreSQLConfig
within the BackendConfig function to ensure the documented default is used.
In `@docs/providers/azure.mdx`:
- Line 59: Update the provider names in the example to use the hyphenated
convention: replace any occurrences of "azure_gpt5" with "azure-gpt5" and
"azure_embed" with "azure-embed" in the register providers example (the line
that currently reads These register providers `azure_gpt5` and `azure_embed`);
ensure any related example usages or references in the same snippet also use the
hyphenated names so the documented suffix naming convention is consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ea3716a2-88d1-4d57-9e91-7040a3da78d1
⛔ Files ignored due to path filters (4)
docs/brand/azure.svgis excluded by!**/*.svgdocs/brand/bedrock.svgis excluded by!**/*.svgdocs/brand/oracle.svgis excluded by!**/*.svgdocs/brand/vertex.svgis excluded by!**/*.svg
📒 Files selected for processing (29)
config/admin.goconfig/config.goconfig/guardrails.goconfig/http.goconfig/logging.goconfig/metrics.goconfig/models.goconfig/providers.goconfig/resilience.goconfig/server.goconfig/storage.goconfig/usage.goconfig/workflows.godocs/advanced/config-yaml.mdxdocs/advanced/configuration.mdxdocs/docs.jsondocs/getting-started/quickstart.mdxdocs/guides/codex.mdxdocs/guides/gemini.mdxdocs/providers/azure.mdxdocs/providers/bedrock.mdxdocs/providers/deepseek.mdxdocs/providers/gemini.mdxdocs/providers/multiple-ollama.mdxdocs/providers/oracle.mdxdocs/providers/overview.mdxdocs/providers/vertex.mdxdocs/providers/vllm.mdxinternal/providers/deepseek/deepseek.go
💤 Files with no reviewable changes (2)
- docs/guides/gemini.mdx
- config/config.go
| PostgreSQL: storage.PostgreSQLConfig{ | ||
| URL: c.PostgreSQL.URL, | ||
| MaxConns: c.PostgreSQL.MaxConns, |
There was a problem hiding this comment.
Apply the documented default for PostgreSQL MaxConns.
The comment on line 31 states that MaxConns has a "default: 10", but the BackendConfig method does not apply this default. If MaxConns is unset, it will remain 0, which is inconsistent with the documented behavior and may lead to unexpected connection pool sizing.
🔧 Proposed fix to apply the MaxConns default
if cfg.MongoDB.Database == "" {
cfg.MongoDB.Database = "gomodel"
}
+ if cfg.PostgreSQL.MaxConns == 0 {
+ cfg.PostgreSQL.MaxConns = 10
+ }
return cfg
}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@config/storage.go` around lines 49 - 51, The BackendConfig construction for
PostgreSQL currently copies c.PostgreSQL.MaxConns directly which leaves it 0
when unset; update BackendConfig so when building storage.PostgreSQLConfig it
applies the documented default (10) if c.PostgreSQL.MaxConns is 0—e.g., compute
a local value (defaulting to 10) and assign that to MaxConns in
storage.PostgreSQLConfig within the BackendConfig function to ensure the
documented default is used.
Azure's DiscoveryConfig does not override NameSeparator, so suffixed env vars produce hyphen-separated provider names (azure-gpt5, azure-embed), not underscore-separated. Vertex and Bedrock explicitly set "_" and keep their underscore convention. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Summary
docs/guides/to a newdocs/providers/tree (DeepSeek, Google Gemini, Ollama, Oracle GenAI, vLLM)docs/brand/docs/advanced/configuration.mdx,docs/guides/codex.mdx, and the path comment ininternal/providers/deepseek/deepseek.goThe overview page explains that dedicated guides exist only for providers with non-obvious setup (cloud-credential chains, deployment URLs, region/project requirements, native-vs-OpenAI-compatible API surfaces). Direct-API providers (OpenAI, Anthropic, Groq, OpenRouter, Z.ai, xAI, MiniMax) follow the standard "set the API key" pattern and intentionally do not have dedicated pages.
Test plan
mint validatepasses locally (already verified by pre-commit hook)/docs, confirm/docs/brand/*.svgresolves (network tab should show 200, not 404)🤖 Generated with Claude Code
Summary by CodeRabbit