You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(config): pass through LiteLLM settings via a litellm: config block
Add an optional `litellm:` mapping in .openkb/config.yaml as the single place to
tune LiteLLM. Keys are forwarded to LiteLLM: `timeout` and `extra_headers` apply
per request (the existing per-call mechanism, covering both the compiler and the
agents-SDK paths), and the rest are set as litellm module globals (drop_params,
num_retries, ssl_verify, ...). Resolves the Ollama UnsupportedParamsError in
#137: `litellm: {drop_params: true}` lets LiteLLM drop params a provider rejects
(e.g. parallel_tool_calls on Ollama).
- config.resolve_litellm_settings(): validate the value is a mapping, drop
non-string keys, pass values through verbatim (the user owns them).
- cli._setup_llm_key(): the `litellm:` block is canonical — when it specifies
`timeout` / `extra_headers` they route to the per-call stashes and replace the
legacy top-level keys (an empty `extra_headers: {}` clears, not reverts); the
rest go to cli._apply_litellm_settings(), which setattrs each onto litellm.
Guards: skip+warn an unknown key, and refuse to overwrite a litellm function.
Globals are applied process-wide and not reset.
- Back-compat: the legacy top-level `timeout:` / `extra_headers:` keys still work
(now undocumented; the `litellm:` block is the documented surface).
- warnings go through the logger (stderr), not click.echo, so a typo can't
corrupt piped stdout (e.g. `openkb query > out.txt`).
- docs: config.yaml.example consolidated under `litellm:`; README drops the
now-redundant top-level extra_headers section.
Closes#137
`entity_types` (optional): a YAML list overriding the entity-type vocabulary used for entity pages; omit it to use the default `person`, `organization`, `place`, `product`, `work`, `event`, `other`.
376
376
377
-
`extra_headers` (optional): a YAML mapping of extra HTTP headers sent with every LLM request (forwarded to LiteLLM's `extra_headers`). Useful for providers that expect custom headers, e.g. GitHub Copilot IDE-auth headers:
378
-
379
-
```yaml
380
-
extra_headers:
381
-
Editor-Version: vscode/1.95.0
382
-
Copilot-Integration-Id: vscode-chat
383
-
```
384
-
385
377
Subscription-based providers that authenticate via OAuth device flow (e.g. `chatgpt/*`, `github_copilot/*`) need no API key; OpenKB skips the missing-key warning for them.
0 commit comments