Skip to content

feat: base URL option for Hindsight Inference (Python, Node.js, CLI 0.2.0) - #6

Merged
cdbartholomew merged 1 commit into
mainfrom
feat/base-url
Nov 22, 2026
Merged

cdbartholomew merged 1 commit into
mainfrom
feat/base-url

Conversation

@cdbartholomew

Copy link
Copy Markdown
Contributor

Iris also runs on Hindsight Inference with the same API: the same paths under the base URL (/files, /extraction, /extraction/{id}) and the same request and response bodies. The organization comes from the key, so it isn't in the path. This PR lets every client point at it.

Option Env var
Python base_url= on extract_text, extract_text_from_file and the async versions VECTORIZE_IRIS_BASE_URL
Node.js baseUrl in ExtractionOptions VECTORIZE_IRIS_BASE_URL
CLI --base-url, or base_url in ~/.vectorize-iris/credentials VECTORIZE_IRIS_BASE_URL

With a base URL, requests go to it as given, and no org ID is needed:

export VECTORIZE_IRIS_BASE_URL="https://inference.hindsight.vectorize.io/v1"
export VECTORIZE_TOKEN="hsk_..."   # Hindsight Inference API key

Without one, nothing changes: requests go to https://api.vectorize.io/v1/org/{orgId}, and the org ID is still required. The CLI's hidden --api-url still replaces only the host.

Versions: Python 0.2.0, Node.js 0.2.0, CLI 0.2.0. The change is additive, and the defaults are unchanged.

Tests: new tests check the URL each call goes to, the env var and argument precedence, and the defaults.

  • Python tests/test_base_url.py: 9, sync and async
  • Node tests/baseUrl.test.ts: 7
  • CLI unit tests: 4
  • Node tsc build and CLI cargo build are clean.

Not fixed here: the older unit suites (python-api/tests/test_vectorize_iris.py, test_async_client.py, nodejs-api/tests/index.test.ts) already fail on main. They patch a module path that no longer exists or call extractText with a file path, and some of them reach the real api.vectorize.io. CI only builds, so this has gone unnoticed.

Publishing (PyPI, npm, CLI binaries) happens separately via release.sh tags after merge.

https://claude.ai/code/session_01XypsfKDtYZSmN3FFv6z5tN

….2.0)

Iris also runs on Hindsight Inference with the same API: the same paths under the base URL
(/files, /extraction, /extraction/{id}) and the same request and response bodies. The organization
comes from the key, so it isn't in the path. Every client can now be pointed at it:

- Python: base_url= on extract_text / extract_text_from_file (and the async versions)
- Node.js: baseUrl in ExtractionOptions
- CLI: --base-url, or base_url in ~/.vectorize-iris/credentials
- All three: the VECTORIZE_IRIS_BASE_URL env var

With a base URL, requests go to it as given and no org ID is needed:

    export VECTORIZE_IRIS_BASE_URL="https://inference.hindsight.vectorize.io/v1"
    export VECTORIZE_TOKEN="hsk_..."

Without one, nothing changes: https://api.vectorize.io/v1/org/{orgId}, org ID required (the CLI's
hidden --api-url still replaces only the host).

Versions: Python 0.2.0, Node.js 0.2.0, CLI 0.2.0. New tests (Python tests/test_base_url.py, Node
tests/baseUrl.test.ts, CLI unit tests) check the URLs each call goes to and the defaults.

Claude-Session: https://claude.ai/code/session_01XypsfKDtYZSmN3FFv6z5tN
@cdbartholomew
cdbartholomew merged commit 9f61cb6 into main Nov 22, 2026
7 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