Feature request: Consider exposing extra API headers as argument

Open
#190 8 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@cpsievert is already working on this.

Since May 12, 2026.

  • #307 by @cpsievert — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

The issue points to ellmer::chat_openai() as the analogous entry point and requests headers on every chat API call. Start by locating chatlas's Python OpenAI-compatible call path and its tests; done means an api_headers argument accepts arbitrary headers, appends them to each call, and has test coverage.

Written by the indexing model from the issue text.

Description

Similar to ellmer::chat_openai() in R, please consider adding an api_headers argument that allows for arbitrary extra headers appended to every chat API call. This would make it easier to integrate internal APIs that use the OpenAI format and a Bearer Token approach in the API header with chatlas in Python.

Dominant language
Python
Stars
179
Forks
32
Avg merge
1d 3h
Merged PRs (30d)
10

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/chatlas

All issues in posit-dev/chatlas

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.