Conversation
Managed prospecting runs now let a caller pick contact, company-check and search engines and a credit limit on a proposed plan, and report candidate_limit and credit_limit stop reasons. The request model is hand-added in generated form until the deployed spec carries it.
The API now prices a run's limit at the plan's per-record rate, so the plan settings take max_spend_usd in place of max_credits.
The API keeps the limit in run state, so run briefs never carry it; only the plan settings take max_spend_usd.
Runs can now ask a short option card before planning. answer_intake posts the picked values / free text per question key through the existing messages route, so older SDKs and servers are unaffected. ProspectingMessageRequest.text becomes optional.
| class ProspectingMessageRequest(DiscolikeRequest): | ||
| text: Annotated[str | None, Field(max_length=4000, min_length=1, title="Text")] = None |
There was a problem hiding this comment.
Empty messages pass validation
Both text and intake are optional, so ProspectingMessageRequest() passes validation and message() sends {}. Previously, a missing message was rejected locally. This now makes an unnecessary API request and leaves the server to reject it. Please require at least one field and test that case.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/discolike/src/discolike/_generated/requests.py
Line: 3249-3250
Comment:
**Empty messages pass validation**
Both `text` and `intake` are optional, so `ProspectingMessageRequest()` passes validation and `message()` sends `{}`. Previously, a missing message was rejected locally. This now makes an unnecessary API request and leaves the server to reject it. Please require at least one field and test that case.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| @@ -214,6 +225,18 @@ def message( | |||
| ) | |||
| return ProspectingMessage.model_validate(response.json()) | |||
|
|
|||
There was a problem hiding this comment.
Intake route loses contract coverage
answer_intake declares the same POST route as message. Route discovery keeps only the first method for a given method and path, so it skips answer_intake during the contract check. That leaves this new method without its own contract coverage. Please avoid declaring the wrapper as a separate route, or account for it explicitly in route discovery.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/discolike/src/discolike/resources/prospecting.py
Line: 227
Comment:
**Intake route loses contract coverage**
`answer_intake` declares the same POST route as `message`. Route discovery keeps only the first method for a given method and path, so it skips `answer_intake` during the contract check. That leaves this new method without its own contract coverage. Please avoid declaring the wrapper as a separate route, or account for it explicitly in route discovery.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Managed prospecting now lets a caller tune the plan before approval and answer the intake card, both live on the API.
prospecting.update_plan(PATCH /prospecting/runs/{id}/plan) sets engines, search provider and amax_spend_usdspending limit;candidate_limitandcredit_limitstop reasons.prospecting.answer_intakewithIntakeAnswer;ProspectingMessageRequest.textis optional so a message can carryintakealone.ProspectingInFlight.progress).The PR appears safe to merge, with non-blocking request-validation and contract-coverage improvements recommended.
Fix with agent prompt
Summary
This PR adds sync and async controls for updating a proposed prospecting plan and answering guided intake, along with request models, documentation, and tests.
Reviews (1) · Last reviewed commit: "Regenerate request models from the dev s..."