Skip to content

Stop client from being state carrier#10595

Merged
pakrym-oai merged 1 commit intomainfrom
pakrym/stop-client-from-being-state-carrier
Feb 4, 2026
Merged

Stop client from being state carrier#10595
pakrym-oai merged 1 commit intomainfrom
pakrym/stop-client-from-being-state-carrier

Conversation

@pakrym-oai
Copy link
Collaborator

I'd like to make client session wide. This requires shedding all random state it has to carry.

pub(crate) struct TurnContext {
pub(crate) sub_id: String,
pub(crate) client: ModelClient,
pub(crate) config: Arc<Config>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you plan to remove all those fields from the ModelClientState then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all, at least half but either way I don't think we should be using the client to carry them around. The fact that the client needs otel is it's implementation detail.

pub(crate) reasoning_effort: Option<ReasoningEffortConfig>,
pub(crate) reasoning_summary: ReasoningSummaryConfig,
pub(crate) session_source: SessionSource,
pub(crate) transport_manager: TransportManager,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this live on client? or because it can change on websocket failure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will get merged with the client.

@pakrym-oai pakrym-oai merged commit 7f20357 into main Feb 4, 2026
32 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/stop-client-from-being-state-carrier branch February 4, 2026 17:05
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants