-
Notifications
You must be signed in to change notification settings - Fork 32
inference-platforms: renames archgw to plano #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
codefromthecrypt
wants to merge
1
commit into
elastic:main
Choose a base branch
from
codefromthecrypt:archgw-to-plano
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # plano | ||
|
|
||
| This shows how to use [Plano][docs] as an OpenAI [LLM router][config], using | ||
| its `tracing` configuration for OpenTelemetry. | ||
|
|
||
| Plano defaults to native mode, downloading pre-compiled Envoy binaries to | ||
| `~/.plano/`. Envoy handles requests, collects telemetry and forwards them to | ||
| Ollama via the OpenAI API. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Start Ollama and your OpenTelemetry Collector via this repository's [README](../README.md). | ||
|
|
||
| ## Run Plano | ||
|
|
||
| Plano is a python command that runs Envoy natively (no Docker required). Run | ||
| `planoai` using `uv run` from [uv][uv]: | ||
|
|
||
| ```bash | ||
| uv run --python 3.13 --with planoai -- planoai up plano_config.yaml | ||
| ``` | ||
|
|
||
| When finished, clean up like this: | ||
|
|
||
| ```bash | ||
| uv run --python 3.13 --with planoai -- planoai down | ||
| ``` | ||
|
|
||
| ## Call Plano with python | ||
|
|
||
| Once Plano is running, use [uv][uv] to make an OpenAI request via | ||
| [chat.py](../chat.py): | ||
|
|
||
| ```bash | ||
| uv run --exact -q --env-file env.local ../chat.py | ||
| ``` | ||
|
|
||
| ## Start Prometheus Scraping | ||
|
|
||
| ### otel-tui | ||
|
|
||
| If you are using [otel-tui][otel-tui] to visualize OpenTelemetry data, you can | ||
| add Plano's Prometheus endpoint to it when starting, like this: | ||
|
|
||
| ```bash | ||
| otel-tui --prom-target http://localhost:9901/stats?format=prometheus | ||
| ``` | ||
|
|
||
| ### Elastic Stack | ||
|
|
||
| If your OpenTelemetry backend is Elasticsearch, you can pump Prometheus metrics | ||
| coming from Plano to Elasticsearch like this: | ||
|
|
||
| ```bash | ||
| docker compose -f docker-compose-elastic.yml run --rm prometheus-pump | ||
| ``` | ||
|
|
||
| ## Notes | ||
|
|
||
| OpenTelemetry signals are a function of native [Envoy support][envoy-otel] | ||
| and anything added in Plano's [wasm filter][plano-wasm]. | ||
|
|
||
| * Traces come from Envoy, whose configuration is written by `planoai`. At the | ||
| moment, this hard-codes aspects including default ports. | ||
| * Prometheus metrics show the cluster as "openai_localhost" - the | ||
| provider_interface plus the first segment of the hostname. | ||
| * Until [this][openai-responses] resolves, don't use `--use-responses-api`. | ||
|
|
||
| The chat prompt was designed to be idempotent, but the results are not. You may | ||
| see something besides 'South Atlantic Ocean.'. | ||
| Just run it again until we find a way to make the results idempotent. | ||
|
|
||
| --- | ||
| [docs]: https://docs.planoai.dev | ||
| [config]: https://docs.planoai.dev/guides/observability/tracing.html | ||
| [envoy-otel]: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/trace/v3/opentelemetry.proto#extension-envoy-tracers-opentelemetry | ||
| [plano-wasm]: https://github.com/katanemo/plano/blob/main/README.md | ||
| [uv]: https://docs.astral.sh/uv/getting-started/installation/ | ||
| [openai-responses]: https://github.com/katanemo/plano/issues/476 | ||
| [otel-tui]: https://github.com/ymtdzzz/otel-tui |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
inference-platforms/archgw/env.local → inference-platforms/plano/env.local
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # Arch gateway endpoint | ||
| # Plano endpoint | ||
| OPENAI_BASE_URL=http://localhost:12000/v1 | ||
| OPENAI_API_KEY=unused | ||
| CHAT_MODEL=qwen3:0.6B | ||
| CHAT_MODEL=qwen3:0.6b | ||
|
|
||
| OTEL_SERVICE_NAME=archgw | ||
| OTEL_SERVICE_NAME=plano | ||
|
|
||
| # Disable resource detectors by default | ||
| OTEL_PYTHON_DISABLED_RESOURCE_DETECTORS=all |
14 changes: 7 additions & 7 deletions
14
inference-platforms/archgw/arch_config.yaml → inference-platforms/plano/plano_config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notably no longer requires docker to run envoy