Skip to content

Conversation

@wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Nov 29, 2025

Update API specifications by running fern api update.


Important

Update API specifications by removing /v1/prompts/improve, adding GeoTarget, and modifying schemas in skyvern_openapi.json.

  • Endpoints:
    • Remove /v1/prompts/improve endpoint from skyvern_openapi.json.
  • Schemas:
    • Remove ImprovePromptRequest and ImprovePromptResponse schemas.
    • Add GeoTarget schema for granular geographic targeting.
    • Modify BranchCondition schema: remove order property.
    • Modify BranchCriteria schema: add expression property.
  • Properties:
    • Rename branches to branch_conditions in ConditionalBlock schema.
    • Update ProxyLocation to include GeoTarget for more detailed targeting.

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


🔄 This PR updates the API specifications by running fern api update, removing the prompt improvement endpoint and enhancing proxy location targeting with granular geographic controls.

🔍 Detailed Analysis

Key Changes

  • API Endpoint Removal: Completely removed the /v1/prompts/improve POST endpoint and its associated request/response schemas (ImprovePromptRequest, ImprovePromptResponse)
  • Conditional Block Schema Updates: Refactored BranchCondition to remove the required order field and updated BranchCriteria to require an expression field
  • Enhanced Proxy Targeting: Added new GeoTarget schema for granular geographic targeting with country, subdivision, and city-level controls
  • Schema Naming Updates: Renamed branches to branch_conditions in ConditionalBlock for better clarity

Technical Implementation

flowchart TD
    A[API Specification Update] --> B[Remove Prompt Improvement]
    A --> C[Update Conditional Logic]
    A --> D[Enhance Proxy Targeting]
    
    B --> B1[Delete /v1/prompts/improve endpoint]
    B --> B2[Remove ImprovePromptRequest schema]
    B --> B3[Remove ImprovePromptResponse schema]
    
    C --> C1[Remove order field from BranchCondition]
    C --> C2[Add expression field to BranchCriteria]
    C --> C3[Rename branches to branch_conditions]
    
    D --> D1[Add GeoTarget schema]
    D --> D2[Support ISO 3166-1/3166-2 codes]
    D --> D3[Enable city-level targeting]
Loading

Impact

  • API Simplification: Removes unused prompt improvement functionality, reducing API surface area and maintenance overhead
  • Enhanced Geographic Control: Provides granular proxy targeting capabilities with standardized ISO codes for better international support
  • Improved Conditional Logic: Streamlines branching logic by removing ordering constraints and adding expression-based evaluation
  • Better Schema Consistency: Updates field naming conventions and adds proper validation constraints for geographic data

Created with Palmier

Summary by CodeRabbit

  • New Features

    • Added geographic targeting capability with country, subdivision, and city-level precision for proxy location configuration.
  • Updates

    • Proxy location fields across task and workflow requests now support detailed geographic specifications.
    • Refined branching conditions structure for improved workflow clarity.
  • Removals

    • Removed deprecated prompt improvement endpoint.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 29, 2025

Walkthrough

Modified the OpenAPI schema to introduce a new GeoTarget schema for geographic targeting, expanded proxy location support to include GeoTarget across multiple request/response schemas, removed the /v1/prompts/improve endpoint and associated schemas, and adjusted branching schema structure by removing the order field and adding a required expression field to BranchCriteria.

Changes

Cohort / File(s) Summary
OpenAPI Schema Update
fern/openapi/skyvern_openapi.json
Added GeoTarget schema with country, subdivision, and city fields; expanded proxy_location support across TaskRunRequest, WorkflowRunRequest, WorkflowCreateYAMLRequest, and related workflow schemas to accept GeoTarget in addition to ProxyLocation; removed /v1/prompts/improve endpoint and ImprovePromptRequest/ImprovePromptResponse schemas; modified BranchCondition to remove order field, updated BranchCriteria to add required expression field, and adjusted branching-related schema titles/descriptions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Ensure all proxy_location field references across request/response schemas are consistently updated to support the GeoTarget union type
  • Verify that removal of the order field from BranchCondition and addition of the required expression field to BranchCriteria align with intended workflow logic and don't introduce breaking changes
  • Confirm removal of /v1/prompts/improve endpoint doesn't impact dependent client code or integrations

Possibly related PRs

Suggested reviewers

  • suchintan

Poem

🐰 Hopping through the schema with glee,
Geographic targets now roam free—GeoTarget's the key!
Proxy locations bloom bright, branching logic refined,
Prompts improve, then retire—new tools we find! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using non-descriptive terms like 'fern api update' that don't convey meaningful information about the actual changes (adding GeoTarget support, removing prompts endpoint, restructuring branching schemas). Provide a more specific title that highlights the main changes, such as 'Add GeoTarget support to proxy location fields and remove prompts improve endpoint' or 'Update API specs: add GeoTarget, remove prompts endpoint, restructure branching'.
✅ 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.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-openapi-spec-2025-11-29T00-31-15-310Z

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 cc3e8da in 2 minutes and 18 seconds. Click for details.
  • Reviewed 368 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 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:2743
  • Draft comment:
    Removed /v1/prompts/improve endpoint and its schemas. Ensure this breaking change is intended and properly deprecated.
  • 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% This comment is asking the PR author to "ensure" or confirm that the breaking change is intended and properly deprecated. This falls under the rule "Do NOT ask the PR author to confirm their intention, to explain, to double-check things, to ensure the behavior is intended." The comment doesn't suggest a specific code change - it's asking for confirmation/verification. The removal of an endpoint is clearly visible in the diff, and if the author removed it, they presumably intended to do so. The comment doesn't point out a specific problem or bug, it's just asking for confirmation that this was intentional. Could this be a legitimate concern about a breaking API change that needs documentation or a deprecation period? Perhaps the comment is trying to prevent an accidental deletion of an important endpoint. While breaking changes are important, the comment doesn't suggest any specific action like "add a deprecation notice" or "update the changelog." It only asks the author to "ensure" it's intended, which is explicitly against the rules. If there was a real issue, the comment should be more specific about what needs to be done. This comment should be deleted because it asks the PR author to confirm/ensure their intention, which violates the review rules. It doesn't provide actionable feedback or suggest a specific code change.
2. fern/openapi/skyvern_openapi.json:5282
  • Draft comment:
    Removed 'order' property from BranchCondition. Verify that implementations consuming this schema are updated.
  • 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:5306
  • Draft comment:
    Added required 'expression' property to BranchCriteria. Confirm that all existing branch criteria include this field and consider validation (e.g. minLength or pattern) if needed.
  • 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.
4. fern/openapi/skyvern_openapi.json:5908
  • Draft comment:
    Renamed 'branches' to 'branch_conditions' in ConditionalBlock. Ensure all references and client usages are updated accordingly.
  • 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.
5. fern/openapi/skyvern_openapi.json:8684
  • Draft comment:
    Added new GeoTarget schema for granular geographic targeting. Consider adding regex patterns to strictly validate ISO 3166-1 alpha-2 country codes.
  • 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.
6. fern/openapi/skyvern_openapi.json:12749
  • Draft comment:
    Updated union types for Proxy Location fields to include GeoTarget and a permissive object (additionalProperties: true). Ensure clients can differentiate between string, GeoTarget objects, and generic objects, and that documentation reflects this flexibility.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is informative and suggests ensuring that clients can differentiate between different types and that documentation reflects this flexibility. However, it does not provide a specific code suggestion or ask for a specific test to be written. It also does not point out a potential issue or ask for confirmation of an intentional change. Therefore, it violates the rule against making purely informative comments.

Workflow ID: wflow_qWc6trModFi9WTyC

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: 4

🧹 Nitpick comments (2)
fern/openapi/skyvern_openapi.json (2)

5835-5850: Branch ordering semantics clarified

Title/description updates look good. Consider explicitly stating evaluation order (first match wins; is_default as fallback) to avoid ambiguity in multi-branch setups.


8611-8671: GeoTarget schema: great addition; tighten validation and clarify examples

  • Consider adding patterns to enforce uppercase country/subdivision: "pattern": "^[A-Z]{2}$" for country and "pattern": "^[A-Z0-9-]{1,10}$" for subdivision.
  • Add minLength: 1 for city when provided.
  • Clarify "CA": distinguish Canada (RESIDENTIAL_CA) vs California (US-CA or GeoTarget {country:"US","subdivision":"CA"}) in examples to avoid confusion.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5571662 and cc3e8da.

📒 Files selected for processing (1)
  • fern/openapi/skyvern_openapi.json (9 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Skyvern-AI/skyvern PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T17:46:44.733Z
Learning: Include a clear description of changes in pull requests
⏰ 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). (2)
  • GitHub Check: Run tests and pre-commit hooks
  • GitHub Check: Analyze (python)
🔇 Additional comments (1)
fern/openapi/skyvern_openapi.json (1)

5228-5248: OpenAPI spec has incomplete schema for BranchCriteria—missing expression language documentation and criteria_type constraint

The expression field in BranchCriteria currently lacks type information: it should document that only Jinja2 template syntax is supported. Additionally, criteria_type should be constrained to enum: ["jinja2_template"] rather than accepting any string, since that's the only implemented variant (per the Python source showing Literal["jinja2_template"]).

Add to OpenAPI spec:

  • "description" to the expression property explaining Jinja2 template format and available context variables
  • "enum": ["jinja2_template"] constraint to criteria_type property

Note: The expression field appears to have always been required in the Python implementation (no default value), so this likely represents spec correction rather than a new breaking change.

Comment on lines +12752 to 12766
{
"$ref": "#/components/schemas/GeoTarget"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"description": "\nGeographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.\n\nAvailable geotargeting options:\n- RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.\n- RESIDENTIAL_ES: Spain\n- RESIDENTIAL_IE: Ireland\n- RESIDENTIAL_GB: United Kingdom\n- RESIDENTIAL_IN: India\n- RESIDENTIAL_JP: Japan\n- RESIDENTIAL_FR: France\n- RESIDENTIAL_DE: Germany\n- RESIDENTIAL_NZ: New Zealand\n- RESIDENTIAL_ZA: South Africa\n- RESIDENTIAL_AR: Argentina\n- RESIDENTIAL_AU: Australia\n- RESIDENTIAL_ISP: ISP proxy\n- US-CA: California\n- US-NY: New York\n- US-TX: Texas\n- US-FL: Florida\n- US-WA: Washington\n- NONE: No proxy\n",
"title": "Proxy Location",
"description": "\nGeographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.\n\nAvailable geotargeting options:\n- RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.\n- RESIDENTIAL_ES: Spain\n- RESIDENTIAL_IE: Ireland\n- RESIDENTIAL_GB: United Kingdom\n- RESIDENTIAL_IN: India\n- RESIDENTIAL_JP: Japan\n- RESIDENTIAL_FR: France\n- RESIDENTIAL_DE: Germany\n- RESIDENTIAL_NZ: New Zealand\n- RESIDENTIAL_ZA: South Africa\n- RESIDENTIAL_AR: Argentina\n- RESIDENTIAL_AU: Australia\n- RESIDENTIAL_ISP: ISP proxy\n- US-CA: California\n- US-NY: New York\n- US-TX: Texas\n- US-FL: Florida\n- US-WA: Washington\n- NONE: No proxy\n Can also be a GeoTarget object for granular city/state targeting: {\"country\": \"US\", \"subdivision\": \"CA\", \"city\": \"San Francisco\"}",
"default": "RESIDENTIAL"
},
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:

#!/bin/bash
# Search for the proxy_location definition and surrounding context
rg -n 'proxy_location' fern/openapi/skyvern_openapi.json -A 15 -B 2

Repository: Skyvern-AI/skyvern

Length of output: 25299


🏁 Script executed:

#!/bin/bash
# Also search for the ProxyLocation schema definition
rg -n '"ProxyLocation"' fern/openapi/skyvern_openapi.json -A 30 -B 2

Repository: Skyvern-AI/skyvern

Length of output: 2051


🏁 Script executed:

#!/bin/bash
# Search for GeoTarget schema to understand the structure better
rg -n '"GeoTarget"' fern/openapi/skyvern_openapi.json -A 15 -B 2

Repository: Skyvern-AI/skyvern

Length of output: 1692


Remove the free-form object from proxy_location anyOf and align description with all ProxyLocation enum values

Verification confirms both concerns:

  1. Free-form object issue: The proxy_location field at line 12747 includes { "additionalProperties": true, "type": "object" } in its anyOf array, which accepts arbitrary objects and undermines type safety. This should be removed.

  2. Missing enum values in description: The description (lines 12763+) omits 6 ProxyLocation enum values that exist in the schema (lines 11331-11336): RESIDENTIAL_BR, RESIDENTIAL_TR, RESIDENTIAL_CA, RESIDENTIAL_MX, RESIDENTIAL_IT, RESIDENTIAL_NL.

Proposed change:

 "proxy_location": {
   "anyOf": [
     { "$ref": "#/components/schemas/ProxyLocation" },
     { "$ref": "#/components/schemas/GeoTarget" },
-    { "additionalProperties": true, "type": "object" },
     { "type": "null" }
   ],
   "title": "Proxy Location",
-  "description": "...[current list]..."
+  "description": "Geographic Proxy location. Either a ProxyLocation enum value or a GeoTarget object for granular city/state targeting."
 }

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +15167 to 15179
{
"$ref": "#/components/schemas/GeoTarget"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
]
],
"title": "Proxy Location"
},
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

Workflow.proxy_location: same object-typing issue

Apply the same restriction to ProxyLocation | GeoTarget | null and update the description to avoid a partial enum list.

🤖 Prompt for AI Agents
In fern/openapi/skyvern_openapi.json around lines 15167 to 15179, the schema for
"Proxy Location" currently allows a free-form object via "additionalProperties":
true alongside a GeoTarget and null; change this to the same restricted typing
used elsewhere by replacing the unconstrained object entry with an explicit
ProxyLocation object schema (i.e., reference or defined object with properties
and additionalProperties: false) or a $ref to the existing ProxyLocation
definition, keep the GeoTarget $ref and null option as needed, and update the
"description" text to remove any partial enum listing so it describes the
allowed types generically (e.g., "Proxy Location may be a ProxyLocation object,
a GeoTarget, or null") rather than enumerating subset values.

Comment on lines +15390 to 15401
"$ref": "#/components/schemas/GeoTarget"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
]
],
"title": "Proxy Location"
},
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

WorkflowCreateYAMLRequest.proxy_location: restrict shape and sync docs

Remove the free-form object branch; keep ProxyLocation | GeoTarget | null. Ensure the prose references the enum rather than an inline, incomplete list.

🤖 Prompt for AI Agents
In fern/openapi/skyvern_openapi.json around lines 15390-15401, the schema for
WorkflowCreateYAMLRequest.proxy_location currently allows a free-form object
branch; remove the {"additionalProperties": true, "type": "object"} entry and
instead ensure the oneOf list contains only a $ref to
"#/components/schemas/ProxyLocation", a $ref to
"#/components/schemas/GeoTarget", and a {"type":"null"} entry (order doesn't
matter). Also update the proxy_location prose/description to reference the
ProxyLocation enum schema (components/schemas/ProxyLocation) rather than an
inline or incomplete list.

Comment on lines +16522 to 16535
"$ref": "#/components/schemas/GeoTarget"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"description": "\nGeographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.\n\nAvailable geotargeting options:\n- RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.\n- RESIDENTIAL_ES: Spain\n- RESIDENTIAL_IE: Ireland\n- RESIDENTIAL_GB: United Kingdom\n- RESIDENTIAL_IN: India\n- RESIDENTIAL_JP: Japan\n- RESIDENTIAL_FR: France\n- RESIDENTIAL_DE: Germany\n- RESIDENTIAL_NZ: New Zealand\n- RESIDENTIAL_ZA: South Africa\n- RESIDENTIAL_AR: Argentina\n- RESIDENTIAL_AU: Australia\n- RESIDENTIAL_ISP: ISP proxy\n- US-CA: California\n- US-NY: New York\n- US-TX: Texas\n- US-FL: Florida\n- US-WA: Washington\n- NONE: No proxy\n",
"title": "Proxy Location",
"description": "\nGeographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.\n\nAvailable geotargeting options:\n- RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.\n- RESIDENTIAL_ES: Spain\n- RESIDENTIAL_IE: Ireland\n- RESIDENTIAL_GB: United Kingdom\n- RESIDENTIAL_IN: India\n- RESIDENTIAL_JP: Japan\n- RESIDENTIAL_FR: France\n- RESIDENTIAL_DE: Germany\n- RESIDENTIAL_NZ: New Zealand\n- RESIDENTIAL_ZA: South Africa\n- RESIDENTIAL_AR: Argentina\n- RESIDENTIAL_AU: Australia\n- RESIDENTIAL_ISP: ISP proxy\n- US-CA: California\n- US-NY: New York\n- US-TX: Texas\n- US-FL: Florida\n- US-WA: Washington\n- NONE: No proxy\n Can also be a GeoTarget object for granular city/state targeting: {\"country\": \"US\", \"subdivision\": \"CA\", \"city\": \"San Francisco\"}",
"default": "RESIDENTIAL"
},
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

WorkflowRunRequest.proxy_location: restrict type; doc drift vs enum

Same as above: drop the arbitrary object, keep ProxyLocation | GeoTarget | null, and update the description to match the full ProxyLocation enum.

🤖 Prompt for AI Agents
In fern/openapi/skyvern_openapi.json around lines 16522 to 16535, the schema for
WorkflowRunRequest.proxy_location currently allows an arbitrary object via
"additionalProperties": true; remove that permissive object option so the type
is restricted to ProxyLocation enum, GeoTarget ($ref to
#/components/schemas/GeoTarget), or null; update the description text to match
the canonical ProxyLocation enum values (replace the current mixed prose with
the full, authoritative list of enum members and clarify GeoTarget usage for
granular city/state targeting).

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