const sessionOverrides = new Map();
function normalizeSessionId(sessionId) {
	return typeof sessionId === "string" ? sessionId.trim() : "";
}
/**
 * Store a model override for a session (e.g., from /model command in autonomous mode).
 */
export function setSessionModelOverride(sessionId, override) {
	const key = normalizeSessionId(sessionId);
	if (!key) return;
	sessionOverrides.set(key, {
		provider: override.provider,
		id: override.id,
	});
}
/**
 * Retrieve the model override for a session, if one was set.
 */
export function getSessionModelOverride(sessionId) {
	const key = normalizeSessionId(sessionId);
	if (!key) return undefined;
	return sessionOverrides.get(key);
}
/**
 * Clear the model override for a session (e.g., at autonomous mode end).
 */
export function clearSessionModelOverride(sessionId) {
	const key = normalizeSessionId(sessionId);
	if (!key) return;
	sessionOverrides.delete(key);
}
