Skip to content

how to add header for basic auth? #1328

@SlavikCA

Description

@SlavikCA

I'm running llama.cpp protected by basic auth.
This works:

curl 'https://direct.acloud.app/v1/models' -H 'authorization: Basic ZnV****dg=='

but when i tried to use it with llm on my MacBook:

nano   "/Users/***/Library/Application Support/io.datasette.llm/extra-openai-models.yaml"

- model_id: GLM46V
  model_name: local-GLM4.6V-106b
  api_base: "https://direct.acloud.app/v1/"
  vision: true
  supports_tools: true
  headers:
    authorization: "Basic ZnV****dg=="

I'm getting:

llm  -m GLM46V 'hi'                                                                          
Error: 401 Unauthorized

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions