-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Update API specifications with fern api update #4138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughModified 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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
368lines of code in1files - Skipped
0files when reviewing. - Skipped posting
6draft 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%<= threshold50%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 by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
There was a problem hiding this 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 clarifiedTitle/description updates look good. Consider explicitly stating evaluation order (first match wins;
is_defaultas 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: 1forcitywhen provided.- Clarify "CA": distinguish Canada (
RESIDENTIAL_CA) vs California (US-CAor GeoTarget{country:"US","subdivision":"CA"}) in examples to avoid confusion.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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 constraintThe
expressionfield in BranchCriteria currently lacks type information: it should document that only Jinja2 template syntax is supported. Additionally,criteria_typeshould be constrained toenum: ["jinja2_template"]rather than accepting any string, since that's the only implemented variant (per the Python source showingLiteral["jinja2_template"]).Add to OpenAPI spec:
"description"to theexpressionproperty explaining Jinja2 template format and available context variables"enum": ["jinja2_template"]constraint tocriteria_typepropertyNote: The
expressionfield 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.
| { | ||
| "$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" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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 2Repository: 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 2Repository: 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 2Repository: 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:
-
Free-form object issue: The
proxy_locationfield at line 12747 includes{ "additionalProperties": true, "type": "object" }in its anyOf array, which accepts arbitrary objects and undermines type safety. This should be removed. -
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.
| { | ||
| "$ref": "#/components/schemas/GeoTarget" | ||
| }, | ||
| { | ||
| "additionalProperties": true, | ||
| "type": "object" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| ], | ||
| "title": "Proxy Location" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| "$ref": "#/components/schemas/GeoTarget" | ||
| }, | ||
| { | ||
| "additionalProperties": true, | ||
| "type": "object" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| ], | ||
| "title": "Proxy Location" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| "$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" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
Update API specifications by running fern api update.
Important
Update API specifications by removing
/v1/prompts/improve, addingGeoTarget, and modifying schemas inskyvern_openapi.json./v1/prompts/improveendpoint fromskyvern_openapi.json.ImprovePromptRequestandImprovePromptResponseschemas.GeoTargetschema for granular geographic targeting.BranchConditionschema: removeorderproperty.BranchCriteriaschema: addexpressionproperty.branchestobranch_conditionsinConditionalBlockschema.ProxyLocationto includeGeoTargetfor more detailed targeting.This description was created by
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
/v1/prompts/improvePOST endpoint and its associated request/response schemas (ImprovePromptRequest,ImprovePromptResponse)BranchConditionto remove the requiredorderfield and updatedBranchCriteriato require anexpressionfieldGeoTargetschema for granular geographic targeting with country, subdivision, and city-level controlsbranchestobranch_conditionsinConditionalBlockfor better clarityTechnical 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]Impact
Created with Palmier
Summary by CodeRabbit
New Features
Updates
Removals
✏️ Tip: You can customize this high-level summary in your review settings.