Skip to content

Fix API version configuration: restore v1 URL path and update header to 1.2.0 - #22

Merged
SirTenzin merged 2 commits into
mainfrom
copilot/fix-api-version-mismatch
Jan 14, 2026
Merged

Fix API version configuration: restore v1 URL path and update header to 1.2.0#22
SirTenzin merged 2 commits into
mainfrom
copilot/fix-api-version-mismatch

Conversation

Copilot AI commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

Aims of this PR

Fixes accidental API version misconfiguration. The SDK was using 1.2 for both URL routing and the X-Api-Version header, but should use v1 for URL paths and 1.2.0 for the header.

Changes:

  • LATEST_API_VERSION: "1.2""1.2.0" (sets X-Api-Version header)
  • Default version parameter in Client and AsyncClient: "1.2""v1" (URL path component)

Result:

import autumn

client = autumn.Client(token="...")
# URLs: https://api.useautumn.com/v1/check
# Headers: X-Api-Version: 1.2.0

Checklist

  • Have code changes been tested?
  • Has documentation been updated?
  • Does this PR fix an issue?
  • Does this PR make breaking changes?

Additional context
The base URL https://api.useautumn.com remains unchanged. The /v1 route version is stable; the X-Api-Version header controls actual API behavior and schema versions.

Original prompt

Can you help me fix a bug where recently we accidentally changed the 'latest api version' from 1.4 to 1.2.

In our API, there are two versions: one in the route, and one in the actual functional api.

https://api.useautumn.com/v1/ is ALWAYS the base url. we won't be changing it any time soon.

However, the X-Api-Version header is the ACTUAL version that changes response schemas and request schemas and functionality. Please make the base latest version X-Api-Version: 1.2.0, and return the version in the URL to v1

Thank you!


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Summary by cubic

Fixes API versioning mismatch by restoring the URL to /v1 and setting the default X-Api-Version to 1.2.0. Aligns request/response schemas to the intended latest functional API version.

Written for commit 4bacebc. Summary will update on new commits.

… version to v1

Co-authored-by: SirTenzin <49116958+SirTenzin@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix bug in API versioning configuration Fix API version configuration: restore v1 URL path and update header to 1.2.0 Jan 14, 2026
Copilot AI requested a review from SirTenzin January 14, 2026 13:13
@SirTenzin
SirTenzin marked this pull request as ready for review January 14, 2026 13:14
@SirTenzin
SirTenzin merged commit a31cec9 into main Jan 14, 2026
1 of 2 checks passed

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 3 files

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