How to configure ZeroClaw parameters? #8175
|
Hello everyone, I would like to ask how to configure ZeroClaw to use a model that is internally deployed within our company. I've been working on this for days but still haven't been able to get it working. The API endpoints for our internal models may require additional custom headers in requests, although the underlying calling interface is basically the same. How should I configure this? To be honest, I find the configuration documentation somewhat ambiguous and unclear. Could the documentation be improved to make it more comprehensive and complete? |
Replies: 1 comment 2 replies
|
If your internal endpoint is OpenAI-compatible, I think the first thing to try is the custom model provider slot rather than creating a new provider. The config shape should be roughly: [providers.models.custom.internal]
uri = "https://your-internal-gateway.example.com/v1"
model = "your-model-name"
api_key = "your-token-or-placeholder"
[agents.default]
model_provider = "custom.internal"
risk_profile = "default"
[risk_profiles.default]
# your existing risk settings hereThe important parts are: [providers.models.custom.internal]where custom is the provider type and internal is just your local alias, and: model_provider = "custom.internal"in the agent config. If your endpoint follows the normal OpenAI-compatible shape: or similar, then uri should normally be the base URL, for example: uri = "https://your-internal-gateway.example.com/v1"not the full /chat/completions path, unless ZeroClaw’s current custom provider expects otherwise in your version. The harder part is your “additional custom headers” requirement. I would not assume that arbitrary provider request headers are currently configurable. There was already a feature request for custom headers, and that sounds very close to your use case. If your internal gateway requires something like: then the current config may not be enough unless your version has added a provider-level headers field. A practical workaround is to put a small internal proxy in front of your model endpoint: The proxy can add the required custom headers and forward the request to your real internal model endpoint. Then ZeroClaw only needs to talk to a normal OpenAI-compatible endpoint with uri + api_key. So my suggested debugging order would be:
I also agree that the documentation could be clearer here. It would help to have one complete example for:
So the short answer is: use a custom OpenAI-compatible provider if the API shape matches OpenAI, but if your company endpoint requires arbitrary extra headers, that may need either a proxy workaround or a ZeroClaw config enhancement. |
Good catch - if
extra_headersexists, this was probably just a TOML format issue.I would expect it inside the provider block, e.g.:
extra_headers = { "X-Tenant-Id" = "tenant", "X-Company-Auth" = "value" }A complete docs example for internal OpenAI-compatible gateways would defintely help future users.