Skip to content

Add custom HTTP headers for custom models #390

@TimZoet

Description

@TimZoet

When adding custom models, the user can't supply any custom headers yet, e.g. tokens for CloudFlare authentication walls.

It is possible to manually edit ~/.aitk/models/my-models.yaml after adding the custom model:

version: v0.1
providers:
  - name: Custom
    models:
      - name: model_name
        chat_completion_url: https://my.entrypoint.com/v1/chat/completions
        headers:
          Authorization: "blabla"
          CF-Access-Client-Id: <fill_in_manually>
          CF-Access-Client-Secret: <fill_in_manually>

However, making edits through the GUI can cause these changes to be lost, and in general it does not seem to be an officially supported way of doing things.

When walking through the Add Custom Model workflow, it would be very convenient if it were possible to specify additional headers (besides the API key), for instance with another text input where you can simply specify it using comma-separated key-value pairs. E.g.:

CF-Access-Client-Id: "aaaaa",CF-Access-Client-Secret: "bbbbb"

Metadata

Metadata

Labels

feature requestThe issue is a feature requestneeds attentionThe issue needs contributor's attention

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions