MCPcopy Index your code
hub / github.com/Helicone/ai-gateway

github.com/Helicone/ai-gateway @v0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.1 ↗ · + Follow
656 symbols 1,233 edges 120 files 19 documented · 3% updated 7mo agov0.2.0-beta.30 · 2025-07-21★ 6086 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Helicone Router

Local Development Setup Instructions

  • Install Rust: https://www.rust-lang.org/tools/install
  • Install Rust analyzer for your IDE.
  • Setup the --all-features flag for your IDE. E.g. for VSCode, go to user preferences (cmd+shift+p), and add the line: "rust-analyzer.cargo.features": "all" to your preferences JSON.
  • Create a Helicone API key for your Helicone user.
  • cp .env.template .env and fill out the PROXY__HELICONE__API_KEY, HELICONE_API_KEY, OPENAI_API_KEY, and ANTHROPIC_API_KEY environment variables, and any others where your local environment does not match the default Helicone configuration.
  • Start the docker compose stack: cd infrastructure && docker compose up -d
  • Start the router (from the root of the repo):
  • with default configs: cargo run
  • with a dev config file: cargo rl
  • Run an HTTP request against the router: cargo run -p test, this is the package in scripts/test/src/main.rs and will eventually be removed or upgraded to a CLI.
  • Run unit + integration tests: cargo int-test

  • TODO: which various homebrew packages are needed? tls, protoc, etc

Extension points exported contracts — how you extend this code

TryConvert (Interface)
`TryFrom` but allows us to implement it for foreign types, so we can maintain boundaries between our business logic and [6 …
llm-proxy/src/middleware/mapper/mod.rs
HasWeight (Interface)
Allows [`Discover::Key`] to expose a weight, so that they can be included in a discover stream [2 implementers]
crates/weighted-balance/src/weight.rs
TestDefault (Interface)
(no doc) [11 implementers]
llm-proxy/src/tests/mod.rs
TryConvertStreamData (Interface)
(no doc) [3 implementers]
llm-proxy/src/middleware/mapper/mod.rs
Endpoint (Interface)
(no doc) [3 implementers]
llm-proxy/src/endpoints/mod.rs
ErrorMetric (Interface)
(no doc) [3 implementers]
llm-proxy/src/error/mod.rs

Core symbols most depended-on inside this repo

clone
called by 136
llm-proxy/src/utils/handle_error.rs
as_ref
called by 40
llm-proxy/src/dispatcher/service.rs
clone
called by 34
crates/weighted-balance/src/balance/make.rs
call
called by 22
llm-proxy/src/app.rs
layer
called by 17
llm-proxy/src/utils/handle_error.rs
path
called by 10
llm-proxy/src/endpoints/mod.rs
register_converter
called by 8
llm-proxy/src/middleware/mapper/registry.rs
is_empty
called by 8
crates/weighted-balance/src/balance/mod.rs

Shape

Method 291
Function 186
Class 123
Enum 46
Interface 10

Languages

Rust100%

Modules by API surface

llm-proxy/src/types/model_id.rs80 symbols
crates/telemetry/src/lib.rs19 symbols
llm-proxy/src/discover/monitor/health/provider.rs18 symbols
llm-proxy/src/config/minio.rs14 symbols
llm-proxy/src/config/router.rs13 symbols
crates/weighted-balance/src/weight.rs13 symbols
llm-proxy/src/middleware/rate_limit/brakes.rs11 symbols
llm-proxy/src/dispatcher/service.rs11 symbols
llm-proxy/src/config/rate_limit.rs11 symbols
crates/weighted-balance/src/balance/mod.rs11 symbols
crates/schema-filter/src/main.rs11 symbols
llm-proxy/src/config/discover.rs10 symbols

For agents

$ claude mcp add ai-gateway \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact