AGENTS.md
internal/modelgateway/AGENTS.mdAGENTS.md
Quality
44/100
Scores the file, not the repository.Length
207 words
8 headings · 0 code blocksRepository
0
— · pushed 78 days agoLast changed
3 days ago
First indexed 3 days ago.1# modelgateway — SDP Runtime Assumptions23## Context Objects4Chat completions: ChatRequest (model, messages, temp, tokens), ChatResponse (message, usage, finish reason)5Routing: RoutingDecision (provider, fallback, policy), RoutingInput (task class, sensitivity, constraints)6RoutingEvidence: Decision + hash + timestamp for audit78## Environment9API keys: ANTHROPIC_API_KEY, OPENAI_API_KEY, SDP_PROVIDER_<ID>_API_KEY10Custom endpoints: SDP_PROVIDER_<ID>_BASE_URL11No env vars for routing-only mode (PolicyRouter without providers)1213## Configuration14Provider (ProviderConfig): ID, key, base URL, model, timeout, retries, rate limits15Router (RouterConfig): Default provider, fallback order, routing rules16Tenant (TenantConfig): Tenant ID, provider, constraints, rate limits17Constraints: Allowed providers/models, max cost per token, data residency1819## Dependencies20From `internal/kernel`: ProviderID, ModelID, ModelCapabilities, RoutingInput/Decision/Constraints, TaskClass, SensitivityLevel21**Risk**: Kernel is shared substrate; breaking changes need coordinated updates across modelgateway, agent runtime, policy2223## Allowlist Behavior24- Checked in PolicyRouter.Route() before provider selection25- TenantConfig.Constraints.AllowedProviders ([]ProviderID)26- Empty list = allow all; non-empty = restrict to listed providers27- Tenant-level override applies after policy evaluation2829## Cost Envelope30Per-request: MaxTokensPerRequest enforced before call31Daily: MaxTokensPerDay aggregated across providers32Cost: CostPerToken (USD/1K) * token count33Rejection: ErrorTypeInvalidInput when limits exceeded34Reset: Midnight UTC3536## Fallback Behavior37Ordered chain: FallbackChain attempted sequentially38Retryable: rate limits, timeouts (ErrorTypeRateLimit, ErrorTypeTimeout)39Non-retryable: auth failures, invalid input, model unavailable40Max retries: ProviderConfig.MaxRetries41Exhaustion: ProviderError "ALL_PROVIDERS_FAILED"42
Also in fall-out-bug/sdp_lab
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| fall-out-bug/sdp_labcmd/AGENTS.md · 0 | AGENTS.md | styledependenciesapido-not+1 | 55/100 | 3 days ago | |
| fall-out-bug/sdp_labinternal/AGENTS.md · 0 | AGENTS.md | styledependenciesapido-not+1 | 55/100 | 3 days ago | |
| fall-out-bug/sdp_labprompts/skills/AGENTS.md · 0 | AGENTS.md | dependenciesapido-notagent-behaviour | 59/100 | 3 days ago | |
| fall-out-bug/sdp_lab.agents/skills/AGENTS.md · 0 | AGENTS.md | dependenciesapido-notagent-behaviour | 59/100 | 3 days ago | |
| fall-out-bug/sdp_lab.codex/AGENTS.md · 0 | AGENTS.md | setupbuildtestlint-format+4 | 86/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/beads.mdc · 0 | Cursor rules | arch | 40/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/bugfix.mdc · 0 | Cursor rules | no sections | 60/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/build.mdc · 0 | Cursor rules | build | 29/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/ci-triage.mdc · 0 | Cursor rules | arch | 40/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/oneshot.mdc · 0 | Cursor rules | no sections | 30/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/codereview.mdc · 0 | Cursor rules | archgit | 40/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/debug.mdc · 0 | Cursor rules | arch | 40/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/deliver.mdc · 0 | Cursor rules | no sections | 39/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/deploy.mdc · 0 | Cursor rules | deployment | 54/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/design.mdc · 0 | Cursor rules | no sections | 25/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/feature.mdc · 0 | Cursor rules | arch | 40/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/hotfix.mdc · 0 | Cursor rules | git | 65/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/idea.mdc · 0 | Cursor rules | no sections | 25/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/issue.mdc · 0 | Cursor rules | api | 25/100 | 3 days ago | |
| fall-out-bug/sdp_lab.cursor/rules/prd.mdc · 0 | Cursor rules | no sections | 16/100 | 3 days ago |
Diff against cmd/AGENTS.md Diff against internal/AGENTS.md Diff against prompts/skills/AGENTS.md Diff against .agents/skills/AGENTS.md Diff against .codex/AGENTS.md Diff against .cursor/rules/beads.mdc Diff against .cursor/rules/bugfix.mdc Diff against .cursor/rules/build.mdc Diff against .cursor/rules/ci-triage.mdc Diff against .cursor/rules/oneshot.mdc Diff against .cursor/rules/codereview.mdc Diff against .cursor/rules/debug.mdc Diff against .cursor/rules/deliver.mdc Diff against .cursor/rules/deploy.mdc Diff against .cursor/rules/design.mdc Diff against .cursor/rules/feature.mdc Diff against .cursor/rules/hotfix.mdc Diff against .cursor/rules/idea.mdc Diff against .cursor/rules/issue.mdc Diff against .cursor/rules/prd.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| OnlyTerp/prompt-cache-skillsAGENTS.md · 112 | AGENTS.md | setupbuildtestlint-format+5 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 2 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago |
