mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-10 11:12:13 +02:00
fix: increase concurrency limit an handle it across all call paths (#508)
* fix: increase concurrency limit an handle it across all call paths * fix: fix review comments and test * fix: address concurrency review findings (campaign-scoped counter, cleanup hardening, webrtc run validation) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat: emit usage_concurrent_call_limit_reached PostHog event Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: align usage event with MPS org-event convention (per-member fan-out) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat: cap max_call_duration at 20 min via typed workflow_configurations request Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f3bcf24370
commit
041c31a613
40 changed files with 2369 additions and 467 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# generated by datamodel-codegen:
|
||||
# filename: dograh-openapi-XXXXXX.json.qHm1SwtOq5
|
||||
# timestamp: 2026-07-07T12:20:41+00:00
|
||||
# filename: dograh-openapi-XXXXXX.json.c3Lmi0soSL
|
||||
# timestamp: 2026-07-09T12:55:26+00:00
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
|
@ -10,6 +10,14 @@ from typing import Annotated, Any, Literal
|
|||
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, RootModel
|
||||
|
||||
|
||||
class AmbientNoiseConfigurationDefaults(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
extra='allow',
|
||||
)
|
||||
enabled: Annotated[bool | None, Field(title='Enabled')] = False
|
||||
volume: Annotated[float | None, Field(title='Volume')] = 0.3
|
||||
|
||||
|
||||
class CalculatorToolDefinition(BaseModel):
|
||||
"""
|
||||
Tool definition for Calculator tools.
|
||||
|
|
@ -582,19 +590,6 @@ class TransferCallToolDefinition(BaseModel):
|
|||
"""
|
||||
|
||||
|
||||
class UpdateWorkflowRequest(BaseModel):
|
||||
name: Annotated[str | None, Field(title='Name')] = None
|
||||
workflow_definition: Annotated[
|
||||
dict[str, Any] | None, Field(title='Workflow Definition')
|
||||
] = None
|
||||
template_context_variables: Annotated[
|
||||
dict[str, Any] | None, Field(title='Template Context Variables')
|
||||
] = None
|
||||
workflow_configurations: Annotated[
|
||||
dict[str, Any] | None, Field(title='Workflow Configurations')
|
||||
] = None
|
||||
|
||||
|
||||
class ValidationError(BaseModel):
|
||||
loc: Annotated[list[str | int], Field(title='Location')]
|
||||
msg: Annotated[str, Field(title='Message')]
|
||||
|
|
@ -603,6 +598,47 @@ class ValidationError(BaseModel):
|
|||
ctx: Annotated[dict[str, Any] | None, Field(title='Context')] = None
|
||||
|
||||
|
||||
class TurnStartStrategy(Enum):
|
||||
default = 'default'
|
||||
min_words = 'min_words'
|
||||
provisional_vad = 'provisional_vad'
|
||||
|
||||
|
||||
class TurnStopStrategy(Enum):
|
||||
transcription = 'transcription'
|
||||
turn_analyzer = 'turn_analyzer'
|
||||
|
||||
|
||||
class WorkflowConfigurationDefaults(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
extra='allow',
|
||||
)
|
||||
ambient_noise_configuration: AmbientNoiseConfigurationDefaults | None = None
|
||||
max_call_duration: Annotated[
|
||||
int | None, Field(gt=0, le=1200, title='Max Call Duration')
|
||||
] = 300
|
||||
max_user_idle_timeout: Annotated[
|
||||
float | None, Field(title='Max User Idle Timeout')
|
||||
] = 10.0
|
||||
smart_turn_stop_secs: Annotated[
|
||||
float | None, Field(title='Smart Turn Stop Secs')
|
||||
] = 2.0
|
||||
turn_start_strategy: Annotated[
|
||||
TurnStartStrategy | None, Field(title='Turn Start Strategy')
|
||||
] = 'default'
|
||||
turn_start_min_words: Annotated[int | None, Field(title='Turn Start Min Words')] = 3
|
||||
provisional_vad_pause_secs: Annotated[
|
||||
float | None, Field(title='Provisional Vad Pause Secs')
|
||||
] = 1.5
|
||||
turn_stop_strategy: Annotated[
|
||||
TurnStopStrategy | None, Field(title='Turn Stop Strategy')
|
||||
] = 'transcription'
|
||||
dictionary: Annotated[str | None, Field(title='Dictionary')] = ''
|
||||
context_compaction_enabled: Annotated[
|
||||
bool | None, Field(title='Context Compaction Enabled')
|
||||
] = False
|
||||
|
||||
|
||||
class WorkflowListResponse(BaseModel):
|
||||
"""
|
||||
Lightweight response for workflow listings (excludes large fields).
|
||||
|
|
@ -778,6 +814,17 @@ class RecordingListResponseSchema(BaseModel):
|
|||
total: Annotated[int, Field(title='Total')]
|
||||
|
||||
|
||||
class UpdateWorkflowRequest(BaseModel):
|
||||
name: Annotated[str | None, Field(title='Name')] = None
|
||||
workflow_definition: Annotated[
|
||||
dict[str, Any] | None, Field(title='Workflow Definition')
|
||||
] = None
|
||||
template_context_variables: Annotated[
|
||||
dict[str, Any] | None, Field(title='Template Context Variables')
|
||||
] = None
|
||||
workflow_configurations: WorkflowConfigurationDefaults | None = None
|
||||
|
||||
|
||||
class CreateToolRequest(BaseModel):
|
||||
"""
|
||||
Request schema for creating a reusable tool.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue