Skip to content

Add Referer: scolta-python header to Amazee control-plane requests#19

Merged
jeremyandrews merged 2 commits into
mainfrom
fix/amazee-referer-header
Jun 18, 2026
Merged

Add Referer: scolta-python header to Amazee control-plane requests#19
jeremyandrews merged 2 commits into
mainfrom
fix/amazee-referer-header

Conversation

@jeremyandrews

@jeremyandrews jeremyandrews commented Jun 18, 2026

Copy link
Copy Markdown
Member

Adds a Referer: scolta-python header to the Amazee control-plane HTTP helpers (_post/_get) so api.amazee.ai can attribute requests to this SDK.

Port of @dan2k3k4's tag1consulting/scolta-php#203 (issue tag1consulting/scolta-php#202), with the package-specific value scolta-python. Thanks to @dan2k3k4 for the original contribution.

Scope: only the two helpers that hit api.amazee.ai. The per-tenant LiteLLM calls (get_available_models, validate_token) target the tenant litellm_api_url and are unchanged.

Tested: uv run pytest and uv run ruff check . pass; added a test asserting the header on a POST (provision_trial) and a GET (list_regions).

Port of tag1consulting/scolta-php#203 by @dan2k3k4.

Co-authored-by: dan2k3k4 <158704+dan2k3k4@users.noreply.github.com>
Comment thread CHANGELOG.md Outdated
(`src/scolta/ai/amazee/client.py`).** The `_post`/`_get` helpers that hit
`api.amazee.ai` now send `Referer: scolta-python` so the Amazee backend can
attribute control-plane traffic to this SDK. Port of @dan2k3k4's scolta-php
#203 (issue #202) with the package-specific value. The per-tenant LiteLLM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the issue is in a different repo, it likely needs to be wrapped and linked else Github will link to issues within this repo. Not sure if adding the org/repo before the # would work automatically.

@jeremyandrews jeremyandrews merged commit a200a46 into main Jun 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants