Skip to content

fix(examples): align gateway env vars with the openapi x-config spec - #352

Merged
edenreich merged 1 commit into
mainfrom
fix/issue-349
Nov 17, 2026
Merged

edenreich merged 1 commit into
mainfrom
fix/issue-349

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Resolves #349

Summary

The example gateway configs used env var names the gateway does not read, so the whole MCP example stack started with MCP silently disabled (the compose set MCP_ENABLE, the gateway reads MCP_ENABLED) and the env templates were full of keys that have no env entry in openapi.yaml x-config. Every key kept or renamed here was verified against the env: entries in openapi.yaml x-config and against the generated config/config.go in inference-gateway/inference-gateway (the two agree).

Changes

  • examples/mcp/docker-compose.yml: MCP_ENABLE -> MCP_ENABLED, so the MCP example actually enables MCP and the agents get tools to call.
  • examples/.env.example: TELEMETRY_ENABLE -> TELEMETRY_ENABLED, MCP_ENABLE -> MCP_ENABLED, MCP_POLLING_ENABLE -> MCP_POLLING_ENABLED, A2A_ENABLE -> A2A_ENABLED, AUTH_ENABLE -> AUTH_ENABLED.
  • examples/.env.example: dropped keys with no x-config entry (A2A_EXPOSE, A2A_POLLING_ENABLE/INTERVAL/TIMEOUT, A2A_MAX_POLL_ATTEMPTS, A2A_MAX_RETRIES, A2A_RETRY_INTERVAL, A2A_INITIAL_BACKOFF, A2A_ENABLE_RECONNECT, A2A_RECONNECT_INTERVAL, A2A_DISABLE_HEALTHCHECK_LOGS, CLIENT_TIMEOUT) and replaced AUTH_OIDC_CLIENT_SECRET with AUTH_OIDC_AUDIENCE, which is what the spec lists.
  • examples/mcp/.env.example: ENABLE_TELEMETRY -> TELEMETRY_ENABLED, ENABLE_AUTH -> AUTH_ENABLED, MCP_ENABLE -> MCP_ENABLED, OIDC_ISSUER_URL/OIDC_CLIENT_ID/OIDC_CLIENT_SECRET -> AUTH_OIDC_ISSUER/AUTH_OIDC_CLIENT_ID/AUTH_OIDC_AUDIENCE, dropped CLIENT_TIMEOUT.
  • MCP_ENABLE_RECONNECT kept as is - it is a real setting (mcp_enable_reconnect, MCP_ prefix + ENABLE_RECONNECT).
  • PROVIDER/LLM/BRAVE_API_KEY kept - they are app-side variables consumed by the example apps and compose interpolation, not gateway settings.
  • Repo-wide grep confirms no other file (READMEs, QUICKSTART, agents compose) referenced the dead names.

Checks

Rename the feature switches the gateway actually reads (MCP_ENABLED, TELEMETRY_ENABLED, MCP_POLLING_ENABLED, A2A_ENABLED, AUTH_ENABLED, TELEMETRY_ENABLED/AUTH_ENABLED in the mcp example, AUTH_OIDC_ISSUER/AUTH_OIDC_CLIENT_ID/AUTH_OIDC_AUDIENCE) and drop keys that have no env entry in openapi.yaml x-config (A2A_EXPOSE, A2A_POLLING_*, A2A_MAX_*, A2A_RETRY_INTERVAL, A2A_INITIAL_BACKOFF, A2A_ENABLE_RECONNECT, A2A_RECONNECT_INTERVAL, A2A_DISABLE_HEALTHCHECK_LOGS, AUTH_OIDC_CLIENT_SECRET, CLIENT_TIMEOUT).
@inference-gateway-maintainer
inference-gateway-maintainer Bot marked this pull request as ready for review November 17, 2026 19:15
@edenreich
edenreich merged commit ad88612 into main Nov 17, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-349 branch November 17, 2026 19:29
inference-gateway-releaser Bot added a commit that referenced this pull request Nov 17, 2026
## [0.31.0](v0.30.0...v0.31.0) (2026-11-17)

### ✨ Features

* sync generated types with schemas v1.14.1 ([#357](#357)) ([c1ac248](c1ac248))

### 🐛 Bug Fixes

* **examples:** align gateway env vars with the openapi x-config spec ([#352](#352)) ([ad88612](ad88612))
* **examples:** migrate examples from removed listTools to mcpJsonRpc ([#355](#355)) ([d3fb472](d3fb472)), references [#347](#347)

### 👷 CI

* align Dependabot schedule and grouping ([#344](#344)) ([c4e6a3e](c4e6a3e))
* **deps-dev:** bump the npm group with 3 updates ([#345](#345)) ([2882a46](2882a46))
* set up orchestrators from repos.yaml ([#346](#346)) ([53394ea](53394ea))

### 📚 Documentation

* **examples:** add audio examples for createSpeech, createSFX and createMusic ([#354](#354)) ([479cfb7](479cfb7))
* **examples:** fix run instructions referencing missing files, scripts and services ([#353](#353)) ([87f9d8d](87f9d8d))

### 🔧 Miscellaneous

* **deps:** bump flox dependencies to latest ([#342](#342)) ([60b715d](60b715d))
* **deps:** bump flox dependencies to latest ([#343](#343)) ([cf43b42](cf43b42))
* **examples:** raise example SDK pins to the current release line ([#356](#356)) ([d2d81c3](d2d81c3))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Example gateway configs use env var names the gateway does not read (MCP_ENABLE, ENABLE_AUTH)

1 participant