{"id":51075835,"url":"https://github.com/xz-dev/hermes-litellm-provider","last_synced_at":"2026-06-23T14:01:54.432Z","repository":{"id":358487093,"uuid":"1241521190","full_name":"xz-dev/hermes-litellm-provider","owner":"xz-dev","description":"Hermes model-provider plugin for LiteLLM proxy","archived":false,"fork":false,"pushed_at":"2026-05-17T15:34:11.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-17T17:44:13.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xz-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T13:49:48.000Z","updated_at":"2026-05-17T15:34:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xz-dev/hermes-litellm-provider","commit_stats":null,"previous_names":["xz-dev/hermes-litellm-provider"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/xz-dev/hermes-litellm-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fhermes-litellm-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fhermes-litellm-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fhermes-litellm-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fhermes-litellm-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xz-dev","download_url":"https://codeload.github.com/xz-dev/hermes-litellm-provider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fhermes-litellm-provider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34692781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-23T14:01:53.412Z","updated_at":"2026-06-23T14:01:54.427Z","avatar_url":"https://github.com/xz-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hermes LiteLLM Provider\n\nHermes model-provider plugin for a local or remote LiteLLM proxy.\n\n## Features\n\n- Uses LiteLLM's OpenAI-compatible `/v1` API.\n- Discovers models from `/v1/model/info` first, then falls back to `/v1/models`.\n- Filters obvious non-chat models such as embeddings and image-generation models.\n- Preserves LiteLLM reasoning effort values, including `minimal`.\n- Sends `reasoning_effort` only when LiteLLM metadata reports support for it.\n\n## Install\n\nHermes discovers model-provider plugins from:\n\n```bash\n~/.hermes/plugins/model-providers/\u003cprovider-name\u003e/\n```\n\nInstall this provider as `litellm`:\n\n```bash\nmkdir -p ~/.hermes/plugins/model-providers/litellm\ncp __init__.py plugin.yaml ~/.hermes/plugins/model-providers/litellm/\nhermes gateway restart\n```\n\n`hermes plugins install owner/repo` is the standard installer for general Hermes\nplugins. Model-provider discovery is path-based, so this provider currently uses\nthe model-provider directory directly.\n\nConfigure Hermes to use LiteLLM:\n\n```yaml\nmodel:\n  provider: litellm\n  default: glm-5.1\n  base_url: http://127.0.0.1:4000/v1\n```\n\nConfigure credentials with Hermes' normal provider credential flow. The plugin\ndeclares `LITELLM_API_KEY` as its provider key name, but reads it through Hermes'\ncredential resolver instead of calling `os.getenv()` directly.\n\n```bash\nhermes auth add litellm\n```\n\nHermes environment-based credentials still work if your Hermes setup already\nuses `.env`, because Hermes' resolver handles that layer. The plugin itself\ndefaults to `http://127.0.0.1:4000/v1` when no provider base URL is resolved.\n\n## Test\n\n```bash\nhermes --provider litellm -m glm-5.1 -z \"Reply only: OK\"\n```\n\nTool-call smoke test:\n\n```bash\nhermes --provider litellm -m glm-5.1 -t terminal -z \"Use terminal to run printf ping, then answer with the command output only\"\n```\n\n## Development\n\nKeep this repository as the source of truth, then deploy to a remote Hermes host\nonly for testing:\n\n```bash\nmake check\nmake deploy REMOTE=xz@100.65.231.22\nmake restart REMOTE=xz@100.65.231.22\nmake test REMOTE=xz@100.65.231.22 MODEL=glm-5.1\n```\n\nThe deploy target copies only `__init__.py` and `plugin.yaml` into the remote\nmodel-provider directory and clears the remote bytecode cache.\n\n## Notes\n\n### Context Length\n\nHermes' current `ProviderProfile.fetch_models()` interface only returns model\nIDs (`list[str]`). This plugin can use `/v1/model/info` to improve model\nmatching and filtering, but it cannot return `max_input_tokens` or context\nlength metadata back through that interface.\n\nContext length should be resolved in Hermes core's model metadata layer. A good\nresolution order is:\n\n1. Explicit user config.\n2. LiteLLM `/v1/model/info` fields such as `max_input_tokens` or `max_tokens`.\n3. `models.dev`, using `litellm_params.model` when available.\n4. Provider-specific defaults.\n5. Hermes fallback default.\n\nThis keeps the plugin focused on provider registration, model discovery, and\nrequest-time compatibility while leaving context sizing to the component that\ncan actually apply it.\n\n### Ollama Cloud Routing\n\nFor Ollama Cloud behind LiteLLM, prefer an OpenAI-compatible route:\n\n```yaml\nmodel: openai/*\napi_base: https://ollama.com/v1\n```\n\nAvoid `ollama/* + https://ollama.com` for models where structured tool calls must be preserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxz-dev%2Fhermes-litellm-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxz-dev%2Fhermes-litellm-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxz-dev%2Fhermes-litellm-provider/lists"}