CodingAgent.OpenRouter (CodingAgent v0.1.0)

Copy Markdown View Source

Thin convenience layer on top of req_llm's OpenRouter provider.

req_llm already understands the "openrouter:<model>" model-id syntax; this module just centralizes API-key configuration and gives default model ids a home.

Summary

Functions

Stores the OpenRouter API key in req_llm's in-memory key store.

The default model used when a session doesn't specify one.

Builds a fully-qualified openrouter:<model> model id.

Functions

configure!(api_key \\ nil)

@spec configure!(String.t() | nil) :: :ok

Stores the OpenRouter API key in req_llm's in-memory key store.

Looks up OPENROUTER_API_KEY from the environment if no key is given.

default_model()

The default model used when a session doesn't specify one.

model(model_slug)

@spec model(String.t()) :: String.t()

Builds a fully-qualified openrouter:<model> model id.