Skip to content

feat!: change the default bind port from 8000 to 8001 - #21

Merged
sideeffffect merged 1 commit into
masterfrom
change-default-port-8001
Aug 1, 2026
Merged

sideeffffect merged 1 commit into
masterfrom
change-default-port-8001

Conversation

@sideeffffect

Copy link
Copy Markdown
Owner

What

Changes the proxy's default bind port from 8000 to 8001.

Why

Port 8000 is one of the most contended ports on a developer machine — Django, uvicorn/FastAPI, python3 -m http.server, php -S and a long tail of local dev servers all default to it. Picking a neighbouring, far less crowded port makes a bare python3 m365_openai_proxy.py much more likely to just work.

Changes

  • m365_openai_proxy.py — --port now defaults to 8001, and its --help text says so.
  • Usage examples updated so copy-pasting them still matches the default:
    • module docstring USAGE block (run line + curl),
    • README.md quick start (run line + curl),
    • README.md Aider example (--openai-api-base http://127.0.0.1:8001/v1).
  • Version bumped 0.9.0 → 0.10.0 in PROXY_VERSION, pyproject.toml and uv.lock, per AGENTS.md's "Versioning & releases" (all three kept in sync). The port a no-flag run binds to is user-visible behavior, so this is not a patch-level change. The vX.Y.Z tag + GitHub Release remain a post-merge step for the maintainer.

REVERSE_ENGINEERING.md still mentions :8000 — deliberately left alone: those are historical records of specific past investigation runs, not instructions to follow.

Compatibility

--port itself is unchanged, so anyone passing it explicitly is unaffected — only the no-flag default moves. Anyone relying on the old default needs either --port 8000 or to repoint their client at :8001.

Verification

Full local CI gate from AGENTS.md, all green:

  • uv run ruff format . — 9 files left unchanged
  • uv run ruff check . — All checks passed
  • uv run bandit -c pyproject.toml m365_openai_proxy.py — 0 issues (Undefined/Low/Medium/High all 0)
  • python3 -m py_compile m365_openai_proxy.py — OK
  • python3 m365_openai_proxy.py --help — OK (also exercises the pure-Python AES self-check); reports bind port (default: 8001)
  • uv run pytest — 22 passed

Still stdlib-only and single-file; no dependency or structural change.

8000 is one of the most contended ports on a developer machine (Django,
uvicorn/FastAPI, `python3 -m http.server`, php -S, and a long tail of
local dev servers all default to it), so the proxy's own default was
prone to colliding with something already running. Move it to 8001.

- `--port` now defaults to 8001 (and says so in its `--help` text).
- Update the usage examples in the module docstring and the README
  (quick-start run + curl, and the Aider `--openai-api-base` example)
  so copy-pasting them still matches the default.
- Bump the version 0.9.0 -> 0.10.0 (`PROXY_VERSION`, `pyproject.toml`,
  `uv.lock`): the default a bare `python3 m365_openai_proxy.py` binds
  to is user-visible behavior, so this is not a patch-level change.

`--port` itself is unchanged, so anyone who passes it explicitly is
unaffected; only the no-flag default moves.
@sideeffffect
sideeffffect merged commit c06af23 into master Aug 1, 2026
14 checks passed
@sideeffffect
sideeffffect deleted the change-default-port-8001 branch August 1, 2026 13:22
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.

1 participant