Skip to content

πŸŽ„ Holiday ToDo List πŸŽ„Β #433

Description

@mostlygeek

Here'a a Holiday feature blitz for 2025. These are just early designs. :)

βœ… 1. Support for API keys

This has been requested (#50, #251) a few times. It's time to add it. It'll be really helpful to support adding support for remote models.

This is can look in the config:

apiKeys: 
   - "sk-api-key-1"
   - "sk-api-key-2"
   - "sk-api-key-3"
   - "sk-api-key-4"
   - "sk-api-key-5"

It'll be a top level configuration item that is just an array of strings. llama-swap has always been default-allow. This will remain true for backwards compatibility.

When the apiKeys list has elements these http-headers will be searched:

  • Authorization: Bearer {apiKey}
  • x-api-key: {apiKey} (anthropic support)

If a valid API key is found then:

  • the Authorization and x-api-key headers will be removed

If a valid API key is NOT found then:

  • send a 401 Unauthorized response

βœ… 2. Add support for remote models (#299)

I've seen some settings where people are using workarounds for llama-swap to proxy to another server. Perhaps this can be done with a few small changes to the configuration. For example:

# peers: object defining other providers
# - optional, default: {} (empty)
peers:
   # minimal configuration to proxy request to another host
   peer_1:  
      # anything that supports the APIs supports by llama-swap
      # can be another llama-swap instance
      proxy: http://192.168.1.131:8080
      # models: a list models on the remote host
      # - local models are search first before peer models 
      # - if multiple peers provide a model, they are searched in the order they were defined
      models: 
        - llama-8B
        - qwen-coder-30B
        - another/model_id

   # support non-local remote models
   openrouter:
      proxy: https://openrouter.ai/api
      # apiKey is injected into the request automatically
      apiKey: sk-this-is-injected-into-request
      models: 
        - qwen/qwen3-235b-a22b-2507
        - meta-llama/llama-3.1-8b-instruct

When apiKey is present in the configuration it will be injected into the request. Based on these rules:

  • it will set or replace the http headers: Authorization and x-api-key to be compatible with HTTP authorization and Anthropic's proprietary header.
  • if no apiKey is set then no key is set on the headers

3. /v1/images - with example using sd-server!

4. Create llama-swap.wiki

  • A new documentation based website for llama-swap
  • a configuration generator - let's vibe code this

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