-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Clarify that modelName: 'provider/model-name' + apiKey is preferred format for v3 API
#1501
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
|
✱ Stainless preview buildsThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ❗ stagehand-ruby studio
❗ stagehand-java studio
❗ stagehand-typescript studio
❗ stagehand-php studio
❗ stagehand-go studio
❗ stagehand-python studio
❗ stagehand-kotlin studio
❗ stagehand-csharp studio
❗ stagehand-cli studio
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Greptile SummaryIntroduces a documentation-only improvement to clarify the preferred model configuration format in the v3 API. The PR adds Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant API as Stagehand API
participant Zod as Zod Validator
participant Gen as OpenAPI Generator
participant Docs as API Documentation
Note over Dev,Docs: Configuration Flow
Dev->>API: Pass model config (string or object)
API->>Zod: Validate with ModelConfigWithOverrideSchema
Zod->>Zod: Check union: ModelNameSchema OR ModelConfigObjectSchema
Zod-->>API: ✓ Both formats accepted at runtime
Note over Gen,Docs: Documentation Generation
Gen->>Zod: Request OpenAPI schema
Zod->>Zod: Apply metadata override()
Zod->>Zod: Delete anyOf/oneOf/ref
Zod->>Zod: Set type: object with modelName + apiKey
Zod-->>Gen: Return simplified object schema
Gen->>Docs: Generate YAML with recommended format only
Note over Docs: Shows: { modelName: 'provider/model', apiKey: 'key' }
Note over API: Accepts: 'provider/model' OR { modelName, apiKey, ... }
|
This comment was marked as off-topic.
This comment was marked as off-topic.
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.
No issues found across 2 files
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.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/server/openapi.v3.yaml">
<violation number="1" location="packages/server/openapi.v3.yaml:83">
P2: `match: {}` is not a valid OpenAPI 3.1/JSON Schema keyword. If pattern validation is intended, use `pattern` with a regex. If no validation is needed, this line can be removed entirely.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
why
what changed
test plan
Summary by cubic
Clarifies the preferred v3 model config format: use model.modelName as 'provider/model-name' with optional model.apiKey or model.baseURL. OpenAPI shows only the recommended object format and deprecates the legacy top-level provider. Adds support for 'ollama' and 'deepseek' prefixes.
Refactors
Migration
Written for commit 7c1934e. Summary will update on new commits.