Skip to content

run_envoy_docker: use CI hash by default.#1211

Merged
htuch merged 2 commits intoenvoyproxy:masterfrom
htuch:ci-hash-run
Jul 5, 2017
Merged

run_envoy_docker: use CI hash by default.#1211
htuch merged 2 commits intoenvoyproxy:masterfrom
htuch:ci-hash-run

Conversation

@htuch
Copy link
Member

@htuch htuch commented Jul 5, 2017

No description provided.

[[ -z "${IMAGE_ID}" ]] && IMAGE_ID="latest"
# The IMAGE_ID defaults to the CI hash but can be set to an arbitrary image ID (found with 'docker
# images').
CI_ENVOY_BUILD_SHA=$(grep "^ENVOY_BUILD_SHA" ci/ci_steps.sh | cut -d\= -f 2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: instead of this fragile cut, can we potentially just move ENVOY_BUILD_SHA into envoy_build_sha.sh and source it from both places? (Then also easier to find where to update the SHA)

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks.

@htuch htuch merged commit 19c3a9a into envoyproxy:master Jul 5, 2017
@htuch htuch deleted the ci-hash-run branch July 5, 2017 16:38
rshriram pushed a commit to rshriram/envoy that referenced this pull request Oct 30, 2018
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
mathetake added a commit that referenced this pull request Mar 3, 2026
**Description**

This implements automatic configuration generation for `aigw run` when
there is no config file and at least the `OPENAI_API_KEY` environment
variables is set.

This makes it easier to get started with OpenAI-compatible backends
without writing or copy/pasting YAML configuration.

Configuration:

When `OPENAI_API_KEY` is set and no config file is provided, `aigw run`
will read these variables and generate configuration from them:
- `OPENAI_API_KEY`: API key for authentication (required)
- `OPENAI_BASE_URL`: Base URL for the backend (defaults to
https://api.openai.com/v1)

Key features:
- Automatic localhost to 127.0.0.1.nip.io conversion for Docker/K8s
- TLS detection based on URL scheme (https) e.g. Tetrate Agent Router
Service: https://api.router.tetrate.ai/v1
- Support for custom API path prefixes e.g. OpenRouter:
https://openrouter.ai/api/v1 or LlamaStack:
http://localhost:8321/v1/openai/v1
- Clean YAML output (omits version (path prefix) field when it's "v1")

This simplifies common use cases:
- OpenAI: `OPENAI_API_KEY=sk-your-key aigw run`
- Ollama: `OPENAI_BASE_URL=http://localhost:11434/v1
OPENAI_API_KEY=unused aigw run`

Here's an example:
```bash
$  OPENAI_API_KEY=sk-not-tellin go run . run
looking up the latest patch for Envoy version 1.35
1.35.3 is already downloaded
starting: /tmp/envoy-gateway/versions/1.35.3/bin/envoy in run directory /tmp/envoy-gateway/runs/1758789738364346000
[2025-09-25 16:42:18.391][48486493][warning][config] [source/server/options_impl_platform_default.cc:9] CPU number provided by HW thread count (instead of cpuset).
{"bytes_received":124,"bytes_sent":795,"connection_termination_details":null,"downstream_local_address":"127.0.0.1:1975","downstream_remote_address":"127.0.0.1:62691","duration":3635,"genai_backend_name":"default/openai/route/aigw-run/rule/0/ref/0","genai_model_name":"gpt-5-nano","genai_model_name_override":"gpt-5-nano","genai_tokens_input":21,"genai_tokens_output":268,"method":"POST","response_code":200,"start_time":"2025-09-25T08:43:07.390Z","upstream_cluster":"httproute/default/aigw-run/rule/0","upstream_host":"162.159.140.245:443","upstream_local_address":"192.168.0.108:62692","upstream_transport_failure_reason":null,"user-agent":"curl/8.14.1","x-envoy-origin-path":"/v1/chat/completions","x-request-id":"9daf1c85-f75e-4c88-a90c-f9cccf85970c"}
```

Fixes #1211

---------

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
Co-authored-by: Anuraag (Rag) Agrawal <anuraaga@gmail.com>
Co-authored-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants