Skip to content

Conversation

@wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Jan 7, 2026

Update API specifications by running fern api update.


📋 This PR updates API specifications using the fern api update command, ensuring the API documentation and schema definitions are synchronized with the latest changes. This appears to be a routine maintenance update to keep API specifications current and accurate.

🔍 Detailed Analysis

Key Changes

  • API Specification Update: Automated update of API specifications using Fern's tooling
  • Documentation Sync: Ensures API documentation remains consistent with current implementation
  • Schema Maintenance: Updates API schema definitions to reflect latest changes

Technical Implementation

flowchart TD
    A[Developer runs 'fern api update'] --> B[Fern analyzes current API]
    B --> C[Updates specification files]
    C --> D[Generates updated documentation]
    D --> E[Commits changes to repository]
    E --> F[Creates Pull Request]
Loading

Impact

  • Documentation Accuracy: Ensures API documentation accurately reflects current implementation
  • Developer Experience: Provides up-to-date API specifications for consumers
  • Maintenance Efficiency: Automated process reduces manual effort in keeping specs current

Limitations

  • No Patch Content: The PR patch is empty, making it impossible to analyze specific file changes
  • Missing Context: Without visible changes, cannot assess the scope or nature of updates
  • No Issue References: No linked issues to provide additional context about what prompted this update

Created with Palmier


Important

Update API specifications to include new billing endpoints and schemas, and update proxy location descriptions.

  • API Endpoints:
    • Add /api/v1/billing/checkout for creating Stripe Checkout Sessions.
    • Add /api/v1/billing/portal for creating Stripe Customer Portal sessions.
    • Add /api/v1/billing/state for retrieving organization billing state.
    • Add /api/v1/billing/change-tier for changing subscription tiers.
  • Schemas:
    • Add BillingStateResponse, ChangeTierRequest, ChangeTierResponse, CheckoutSessionResponse, CheckoutSubscriptionRequest, PortalSessionResponse, and PlanTier.
  • Descriptions:
    • Update geographic proxy location descriptions to include RESIDENTIAL_PH and mark certain US locations as deprecated.

This description was created by Ellipsis for 6862abc. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added comprehensive billing system with checkout, customer portal access, plan tier switching, and billing state monitoring
    • Introduced three subscription plan tiers to meet different needs: free, hobby, and pro
    • Enhanced code output blocks with screenshot artifact support for improved documentation
    • Expanded proxy location coverage with new residential proxy options

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

A single OpenAPI specification file was updated to introduce four new billing endpoints (/api/v1/billing/checkout, /api/v1/billing/portal, /api/v1/billing/state, /api/v1/billing/change-tier), define seven new billing-related schemas (plan tiers, billing state, checkout session, portal session, and change-tier operations), enhance the CodeBlock model with a screenshot_artifact_id field, and add a new RESIDENTIAL_PH proxy location option.

Changes

Cohort / File(s) Summary
Billing API Endpoints & Schemas
fern/openapi/skyvern_openapi.json
Added 4 new billing endpoints: POST /api/v1/billing/checkout (subscription creation), POST /api/v1/billing/portal (customer portal session), GET /api/v1/billing/state (billing status), POST /api/v1/billing/change-tier (plan tier modification). Introduced 7 new schemas: PlanTier enum (free, hobby, pro), BillingStateResponse (state and credit tracking), CheckoutSubscriptionRequest/CheckoutSessionResponse (subscription flow), PortalSessionResponse (portal redirect), ChangeTierRequest/ChangeTierResponse (tier updates).
Model Enhancements
fern/openapi/skyvern_openapi.json
Extended CodeBlock schema with screenshot_artifact_id field (string|null); added RESIDENTIAL_PH option to ProxyLocation enum.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • suchintan

Poem

🐰 A billing system hops into place,
Four endpoints dancing through cyberspace,
Tiers and states and checkouts flow,
While screenshots artifact and screenshots glow!
The API grows wise, structured and bright,
Our Skyvern now handles payments right! ✨

Pre-merge checks

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Update API specifications with fern api update' is vague and generic, using non-descriptive language that doesn't convey meaningful information about the actual changes (billing APIs, proxy locations, CodeBlock enhancements). Consider a more descriptive title that highlights the main changes, such as 'Add billing API endpoints and update proxy/CodeBlock schemas' or 'Integrate billing endpoints and enhance data models'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 6862abc in 2 minutes and 17 seconds. Click for details.
  • Reviewed 481 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. fern/openapi/skyvern_openapi.json:2952
  • Draft comment:
    x-api-key header is set as optional (required: false). If authentication is mandatory, consider marking it as required.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
2. fern/openapi/skyvern_openapi.json:5340
  • Draft comment:
    For consistency, consider using a $ref to '#/components/schemas/PlanTier' for the 'tier' property in ChangeTierResponse (as done in ChangeTierRequest) instead of using a plain string.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. fern/openapi/skyvern_openapi.json:2975
  • Draft comment:
    The x-api-key header parameter is repeated across multiple endpoints. Consider defining a reusable header parameter to reduce duplication.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% This is a code quality refactoring suggestion about OpenAPI spec structure. While it's technically correct that there's duplication, I need to consider: 1) This is an OpenAPI JSON file that is likely auto-generated from code (common pattern with FastAPI/similar frameworks), 2) The comment is about refactoring/code quality, not a bug, 3) Looking at the existing endpoints in the file (not shown in diff but referenced), they likely also have this same duplication pattern, meaning this is consistent with the existing codebase style, 4) The rules say "Comments that suggest code quality refactors are good! But only if they are actionable and clear" - but for auto-generated OpenAPI specs, manually refactoring them is often not the right approach since they get regenerated. I might be wrong about this being auto-generated - it could be manually maintained. Also, even if auto-generated, there might be ways to configure the generation to use reusable components. The comment is actionable and clear about what should be done. While the comment is technically correct and actionable, OpenAPI JSON files are typically auto-generated from backend code annotations/decorators. If this file is auto-generated (which is the standard practice), then manually editing it to use reusable components would be counterproductive as changes would be overwritten on next generation. The proper fix would be in the code generation configuration or backend code, not in this JSON file. Without strong evidence that this file is manually maintained, and given that similar duplication likely exists throughout the file in existing endpoints, this comment is likely not useful. This comment should be deleted. It's a refactoring suggestion for an OpenAPI spec file that is almost certainly auto-generated, making manual refactoring inappropriate. The duplication pattern is likely consistent throughout the existing codebase.
4. fern/openapi/skyvern_openapi.json:3505
  • Draft comment:
    BillingStateResponse includes nullable fields (e.g. current_period_start/end) in the required list. Confirm if null values are expected; otherwise, consider making these fields optional.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% In OpenAPI/JSON Schema, having a field in the "required" array means the field key must be present in the JSON object. The "anyOf" with null type means the field can have a null value. These are not mutually exclusive - a field can be required to be present but allowed to have a null value. This is actually a common and valid pattern. The comment seems to misunderstand this distinction and is asking for confirmation about something that is perfectly valid. This is speculative ("Confirm if...") and doesn't point to a definite issue. The comment also says "consider making these fields optional" which is a suggestion without strong evidence of a problem. I might be missing context about the business logic - perhaps these fields should never be null in practice, and the schema is incorrectly permissive. However, without seeing the actual implementation or understanding the business requirements, I cannot determine if this is truly an issue. The comment is asking the PR author to "confirm" something and uses the word "consider", which are both red flags according to the rules. The comment is speculative and doesn't identify a definite problem. The schema definition is technically valid in OpenAPI, and without strong evidence that this is wrong, the comment should be deleted. This comment should be deleted. It's asking for confirmation and making a speculative suggestion without strong evidence of an actual problem. The schema definition is technically valid in OpenAPI (required + nullable is a common pattern), and the comment doesn't demonstrate a clear code change that's needed.

Workflow ID: wflow_D573XadoJusYnz2X

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @fern/openapi/skyvern_openapi.json:
- Around line 2953-3175: The OpenAPI spec for
create_checkout_session_api_v1_billing_checkout_post is missing the documented
400 response: add a "400" responses entry with description "Org already has an
active subscription; use portal instead." to the "/api/v1/billing/checkout" POST
responses so client generators include it. Also verify the path prefix
consistency for all billing endpoints (currently "/api/v1/billing/...") against
the project's public API convention (e.g., "/v1/..."); if the intended prefix is
"/v1/billing/..." rename the paths and update the operationId tokens accordingly
(e.g., create_checkout_session_api_v1_billing_checkout_post → adjust to match
the new path).
🧹 Nitpick comments (1)
fern/openapi/skyvern_openapi.json (1)

4616-4705: Billing schemas and PlanTier wiring look coherent; consider tightening ChangeTierResponse.tier

  • PlanTier and BillingStateResponse are wired consistently, and both CheckoutSubscriptionRequest.tier and ChangeTierRequest.tier correctly reference PlanTier, which is good for generated SDK enums and validation.
  • In ChangeTierResponse, however, tier is currently a plain string. If the API always returns one of the PlanTier values here, you could strengthen the contract by referencing PlanTier instead, which will make client types more precise.
Optional schema tweak for `ChangeTierResponse.tier`
       "ChangeTierResponse": {
         "properties": {
           "status": {
             "type": "string",
             "title": "Status"
           },
-          "tier": {
-            "type": "string",
-            "title": "Tier"
-          }
+          "tier": {
+            "$ref": "#/components/schemas/PlanTier"
+          }
         },
         "type": "object",
         "required": [
           "status",
           "tier"
         ],
         "title": "ChangeTierResponse"
       },

Also applies to: 5658-5717, 11885-11907

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 058a917 and 6862abc.

📒 Files selected for processing (1)
  • fern/openapi/skyvern_openapi.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run tests and pre-commit hooks
🔇 Additional comments (2)
fern/openapi/skyvern_openapi.json (2)

3504-3514: New screenshot_artifact_id on Action is backward‑compatible and well‑typed

The added screenshot_artifact_id is optional (string|null) and not added to the required list, so it’s safe for existing clients while enabling richer linkage to screenshot artifacts at the action level. This looks consistent with how other optional properties are modeled.


6331-6340: Proxy location additions for RESIDENTIAL_PH are consistent across enum and docs

The new RESIDENTIAL_PH value is:

  • added to the ProxyLocation enum, and
  • documented in the proxy location descriptions for CreateBrowserSessionRequest, TaskRunRequest, and WorkflowRunRequest.

This keeps the enum and narrative docs in sync and preserves the existing notes about deprecated US-* values routing via RESIDENTIAL_ISP. Looks good.

Also applies to: 13519-13537, 17436-17455, 11987-12015

Comment on lines +2953 to 3175
"/api/v1/billing/checkout": {
"post": {
"summary": "Create Checkout Session",
"description": "Create a Stripe Checkout Session for subscribing to a tier.\n\nFrontend should redirect the user to the returned URL.\nAfter successful checkout, Stripe will send a webhook that we handle\nto store the subscription and initialize billing state.\n\nReturns 400 if org already has an active subscription (use portal instead).",
"operationId": "create_checkout_session_api_v1_billing_checkout_post",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.",
"title": "X-Api-Key"
},
"description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CheckoutSubscriptionRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CheckoutSessionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/billing/portal": {
"post": {
"summary": "Create Portal Session",
"description": "Create a Stripe Customer Portal session for managing subscription.\n\nFrontend should redirect the user to the returned URL.\nThe portal allows users to:\n- Update payment methods\n- Upgrade/downgrade plans\n- Cancel subscription\n- View invoices",
"operationId": "create_portal_session_api_v1_billing_portal_post",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.",
"title": "X-Api-Key"
},
"description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings."
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PortalSessionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/billing/state": {
"get": {
"summary": "Get Organization Billing",
"operationId": "get_organization_billing_api_v1_billing_state_get",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.",
"title": "X-Api-Key"
},
"description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings."
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/BillingStateResponse"
},
{
"type": "null"
}
],
"title": "Response Get Organization Billing Api V1 Billing State Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/billing/change-tier": {
"post": {
"summary": "Change Tier",
"description": "Change the subscription tier (upgrade or downgrade).\n\nThis swaps the tier price while keeping metered items unchanged.\nStripe will fire a customer.subscription.updated webhook which\nupdates the billing state automatically.",
"operationId": "change_tier_api_v1_billing_change_tier_post",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.",
"title": "X-Api-Key"
},
"description": "Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChangeTierRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChangeTierResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's check the actual paths in the billing endpoints section
cd fern/openapi
head -c 500000 skyvern_openapi.json | tail -c 200000 | grep -A 5 '"/api/v1/billing' | head -50

Repository: Skyvern-AI/skyvern

Length of output: 44


🏁 Script executed:

# Check various endpoint patterns
rg '"/[a-z]+' fern/openapi/skyvern_openapi.json | head -30

Repository: Skyvern-AI/skyvern

Length of output: 1099


🏁 Script executed:

# Look specifically at the checkout endpoint to see all its details
rg -A 20 'create_checkout_session' fern/openapi/skyvern_openapi.json | head -50

Repository: Skyvern-AI/skyvern

Length of output: 797


🏁 Script executed:

# Check if there are any 400 responses defined elsewhere in the spec
rg '"400"' fern/openapi/skyvern_openapi.json | head -20

Repository: Skyvern-AI/skyvern

Length of output: 137


🏁 Script executed:

# Get the exact responses section for checkout
rg -A 40 '"create_checkout_session_api_v1_billing_checkout_post"' fern/openapi/skyvern_openapi.json | grep -A 30 '"responses"'

Repository: Skyvern-AI/skyvern

Length of output: 363


🏁 Script executed:

# Find which endpoints have 400 responses
rg -B 10 '"400"' fern/openapi/skyvern_openapi.json | grep -E '(operationId|"400")' | head -40

Repository: Skyvern-AI/skyvern

Length of output: 137


🏁 Script executed:

# Check all billing endpoints' responses
rg -A 45 'billing' fern/openapi/skyvern_openapi.json | grep -E '(operationId|"responses"|"200"|"400"|"422")' | head -50

Repository: Skyvern-AI/skyvern

Length of output: 605


🏁 Script executed:

# Verify the exact description text for checkout
rg -A 5 'Create Checkout Session' fern/openapi/skyvern_openapi.json | head -10

Repository: Skyvern-AI/skyvern

Length of output: 605


🏁 Script executed:

# Check if the description mentions the 400 error
rg -B 3 -A 8 '"Create Checkout Session"' fern/openapi/skyvern_openapi.json | head -20

Repository: Skyvern-AI/skyvern

Length of output: 745


Add 400 response to checkout endpoint and verify path prefix consistency

The create_checkout_session endpoint description explicitly states "Returns 400 if org already has an active subscription (use portal instead)", but the responses section only declares 200 and 422. This spec/behavior mismatch will cause client generators to ignore the documented 400 error. Add the 400 response to align with the description:

"400": {
  "description": "Org already has an active subscription; use portal instead."
}

Additionally, all existing public endpoints follow the /v1/... pattern (e.g., /v1/run/tasks, /v1/workflows), but these new billing endpoints use /api/v1/billing/.... Verify this path prefix is correct for the live API; if it should be /v1/billing/... instead, update to match the established convention.

🤖 Prompt for AI Agents
In @fern/openapi/skyvern_openapi.json around lines 2953 - 3175, The OpenAPI spec
for create_checkout_session_api_v1_billing_checkout_post is missing the
documented 400 response: add a "400" responses entry with description "Org
already has an active subscription; use portal instead." to the
"/api/v1/billing/checkout" POST responses so client generators include it. Also
verify the path prefix consistency for all billing endpoints (currently
"/api/v1/billing/...") against the project's public API convention (e.g.,
"/v1/..."); if the intended prefix is "/v1/billing/..." rename the paths and
update the operationId tokens accordingly (e.g.,
create_checkout_session_api_v1_billing_checkout_post → adjust to match the new
path).

@wintonzheng wintonzheng closed this Jan 9, 2026
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