You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ GoModel is a high-performance AI gateway in Go that routes requests to multiple
8
8
9
9
Follow Postel's Law: be conservative in what you send, liberal in what you accept.
10
10
11
-
-GOModel accepts client requests generously (e.g. `max_tokens` for any model) and adapts them to each provider's specific requirements before forwarding (e.g. translating `max_tokens` → `max_completion_tokens` for OpenAI reasoning models).
12
-
-GOModel accepts providers' responses liberally and passes them to the user in a conservative OpenAI-compatible shape.
11
+
-GoModel accepts client requests generously (e.g. `max_tokens` for any model) and adapts them to each provider's specific requirements before forwarding (e.g. translating `max_tokens` → `max_completion_tokens` for OpenAI reasoning models).
12
+
-GoModel accepts providers' responses liberally and passes them to the user in a conservative OpenAI-compatible shape.
Copy file name to clipboardExpand all lines: CLAUDE.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,10 @@ Guidance for AI models (like Claude) working with this codebase.
4
4
5
5
## Project Overview
6
6
7
-
**GOModel** is a high-performance AI gateway in Go that routes requests to multiple AI model providers (OpenAI, Anthropic, Gemini, Groq, xAI, Oracle, Ollama). LiteLLM killer.
7
+
**GoModel** is a high-performance AI gateway in Go that routes requests to multiple AI model providers (OpenAI, Anthropic, Gemini, Groq, xAI, Oracle, Ollama). LiteLLM killer.
8
8
9
9
**Go:** 1.26.2
10
-
**Repo:**https://github.com/ENTERPILOT/GOModel
10
+
**Repo:**https://github.com/ENTERPILOT/GoModel
11
11
12
12
-**Stage:** Development - backward compatibility is not a concern
13
13
-**Design philosophy:**
@@ -36,7 +36,7 @@ make clean # Remove bin/
36
36
make record-api # Record API responses for contract tests
37
37
make swagger # Regenerate Swagger docs
38
38
make infra # Docker Compose: Redis, Postgres, MongoDB, Adminer only
39
-
make image # Docker Compose: full stack (GOModel + Prometheus)
39
+
make image # Docker Compose: full stack (GoModel + Prometheus)
40
40
```
41
41
42
42
**Single test:**`go test ./internal/providers -v -run TestName`
Only fields that are explicitly listed under a provider's `resilience:` block are overridden. Everything else silently inherits from the global section.
126
124
127
125
---
@@ -163,7 +161,6 @@ GROQ_API_KEY=gsk_...
163
161
164
162
All resilience settings can be overridden at runtime via env vars. Env vars always beat both code defaults and YAML values.
| `RETRY_MAX_RETRIES` | int | `3` | Maximum retry attempts per request |
@@ -174,36 +171,33 @@ All resilience settings can be overridden at runtime via env vars. Env vars alwa
174
171
| `CIRCUIT_BREAKER_FAILURE_THRESHOLD` | int | `5` | Consecutive failures before opening |
175
172
| `CIRCUIT_BREAKER_SUCCESS_THRESHOLD` | int | `2` | Consecutive successes to close again |
176
173
| `CIRCUIT_BREAKER_TIMEOUT` | duration | `30s` | How long the circuit stays open |
177
-
| `LOG_FORMAT` | string | *(unset)* | Auto-detects based on environment: colorized text on a TTY, JSON otherwise. Set to `text` to force human-readable output (no colors if not a TTY), or `json` to force structured JSON even on a TTY (recommended for production, CloudWatch, Datadog, GCP). |
178
-
| `LOG_LEVEL` | string | `info` | Minimum runtime log level. Supported values are `debug`, `info`, `warn`, and `error`. Common aliases such as `dbg`, `inf`, `warning`, and `err` are also accepted. |
179
-
174
+
| `LOG_FORMAT` | string | _(unset)_ | Auto-detects based on environment: colorized text on a TTY, JSON otherwise. Set to `text` to force human-readable output (no colors if not a TTY), or `json` to force structured JSON even on a TTY (recommended for production, CloudWatch, Datadog, GCP). |
175
+
| `LOG_LEVEL` | string | `info` | Minimum runtime log level. Supported values are `debug`, `info`, `warn`, and `error`. Common aliases such as `dbg`, `inf`, `warning`, and `err` are also accepted. |
See `.env.template` for the full list of all configurable environment variables.
209
203
@@ -233,7 +227,7 @@ If your Oracle endpoint does not return a usable model list, configure `provider
233
227
**Azure ships with a pinned API version by default.**
234
228
If you do not set `AZURE_API_VERSION`, the gateway sends `api-version=2024-10-21`. Override it only when you need a different Azure API version.
235
229
236
-
**OpenRouter gets GOModel attribution headers by default.**
230
+
**OpenRouter gets GoModel attribution headers by default.**
237
231
When the `openrouter` provider is used, the gateway adds `HTTP-Referer` and `X-OpenRouter-Title` unless the request already provides them. Override the defaults with `OPENROUTER_SITE_URL` and `OPENROUTER_APP_NAME`.
238
232
239
233
**Partial YAML fields leave the rest at defaults.**
0 commit comments