Skip to content

[DOCS] Gateway config drift: SERVER_HOST default, LOG_LEVEL, OTEL exporter vars, troubleshooting #776

Closed

Description

Summary

The gateway configuration, observability and troubleshooting pages no longer match the gateway code. The sources are config/config.go (generated from the schemas openapi.yaml), the runtime in cmd/gateway/main.go, and the packages under internal/platform and api/middlewares:

  • SERVER_HOST has defaulted to 127.0.0.1 since the schema change of 2026-08-04, but configuration.md still says 0.0.0.0. Only the Docker images (Dockerfile, Dockerfile.goreleaser) set ENV SERVER_HOST=0.0.0.0, so a gateway started from the release binary listens on loopback unless SERVER_HOST is set.
  • The gateway never reads LOG_LEVEL. Log verbosity comes from ENVIRONMENT: development selects zap's development config (debug level), and any other value selects the JSON production config (info level). See internal/platform/logger/logger.go.
  • The gateway never reads OTEL_METRICS_EXPORTER, OTEL_EXPORTER_PROMETHEUS_HOST or OTEL_EXPORTER_PROMETHEUS_PORT. internal/platform/otel/otel.go always installs the Prometheus exporter, and cmd/gateway/main.go serves it at :<TELEMETRY_METRICS_PORT>/metrics. These variables belong to the Go and TypeScript ADKs.
  • VIDEOS_ENABLED and SERVER_MAX_REQUEST_BODY_SIZE exist in config/config.go but are missing from the reference tables.
  • troubleshooting.md still describes settings, metrics and middleware behavior the gateway no longer has.

Acceptance Criteria

  • configuration.md Server Settings (and the Complete Configuration Example): SERVER_HOST defaults to 127.0.0.1, not 0.0.0.0; note that the published container images set SERVER_HOST=0.0.0.0
  • configuration.md Server Settings: add SERVER_MAX_REQUEST_BODY_SIZE (default 10485760, 10 MiB)
  • configuration.md General Settings: add VIDEOS_ENABLED (default false). It gates POST /v1/videos, GET /v1/videos/{video_id} and GET /v1/videos/{video_id}/content, which return 404 while it is off
  • configuration.md Telemetry table and Complete Configuration Example: remove OTEL_METRICS_EXPORTER, OTEL_EXPORTER_PROMETHEUS_HOST and OTEL_EXPORTER_PROMETHEUS_PORT; the gateway always serves Prometheus pull metrics on TELEMETRY_METRICS_PORT
  • observability.md "Metrics Exporter Selection": drop "and the gateway itself"; only the ADKs read OTEL_METRICS_EXPORTER
  • configuration.md Logging and Debugging and mcp.md Troubleshooting > Logging: replace LOG_LEVEL (not read by the gateway) with ENVIRONMENT=development for debug logs
  • configuration.md paragraph after the General Settings table: audio is served by openai and elevenlabs (speech, sound effects, music) plus the local local/qwen3-tts engine, not only by openai (see providers/registry/registry_data.go)
  • troubleshooting.md "Auth is enabled but every request returns 401": remove AUTH_OIDC_CLIENT_SECRET from "the three OIDC variables" (the gateway has no such setting) and cover an aud mismatch with AUTH_OIDC_AUDIENCE as a likely cause
  • troubleshooting.md Provider Errors PromQL: llm_responses_total{provider=...} no longer exists; use gen_ai_server_request_duration_seconds_count with the gen_ai_provider_name and error_type labels
  • troubleshooting.md proxy notes ("skips all middleware (auth, MCP, telemetry)", "skips the entire middleware chain"): the OIDC middleware in api/middlewares/auth.go skips only /health and the RFC 9728 metadata path, and the guardrails pre_call check runs on every path, so /proxy/... is still authenticated and policy-checked. Only the MCP and telemetry middlewares are limited to chat completions
  • troubleshooting.md "Bypass MCP middleware": the gateway never sets X-MCP-Bypass itself; MCP follow-up calls are in-process provider calls in internal/mcp/agent.go
  • troubleshooting.md Configuration: booleans are parsed with strconv.ParseBool (via go-envconfig), so True, TRUE and 1 are accepted; only values such as yes are rejected

Activity

  1. added
    documentation
    on Sep 25, 2026
  2. edenreich commented on Sep 25, 2026

    @edenreich
    Contributor

    @claude Can you work on this?

  3. inference-gateway-maintainer commented on Sep 25, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 3m 18s —— View job • docs/issue-776-20260925-2135 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-776-20260925-2135?quick_pull=1&title=Issue%20%23776%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23776%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Gateway config drift fixed

    All acceptance criteria implemented in PR #782.

    • configuration.md - SERVER_HOST default 127.0.0.1 + container-image note (table, Server Settings prose, Complete Configuration Example)
    • configuration.md - added SERVER_MAX_REQUEST_BODY_SIZE (10485760) and VIDEOS_ENABLED (false)
    • configuration.md - removed OTEL_METRICS_EXPORTER / OTEL_EXPORTER_PROMETHEUS_HOST / OTEL_EXPORTER_PROMETHEUS_PORT; the gateway always serves Prometheus pull metrics on TELEMETRY_METRICS_PORT
    • configuration.md - Logging and Debugging documents ENVIRONMENT instead of LOG_LEVEL
    • configuration.md - audio served by openai and elevenlabs plus local local/qwen3-tts
    • observability.md - OTEL_METRICS_EXPORTER is ADK-only
    • mcp.md - debug logs via ENVIRONMENT=development
    • troubleshooting.md - 401 section: no AUTH_OIDC_CLIENT_SECRET, aud mismatch covered
    • troubleshooting.md - PromQL uses gen_ai_server_request_duration_seconds_count with gen_ai_provider_name / error_type
    • troubleshooting.md - /proxy/... is still authenticated and guardrails pre_call-checked
    • troubleshooting.md - the gateway never sets X-MCP-Bypass; follow-ups are in-process
    • troubleshooting.md - booleans via strconv.ParseBool (True, TRUE, 1 accepted; yes rejected)
    • Validated: bun run lint:md, bun run format:check, bun run build, bun test all pass

    Nothing was left out. No generated sections were touched - all edits sit outside the GENERATED:* markers.
    | Branch | PR #782

  4. inference-gateway-releaser commented on Sep 26, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.17 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions