@@ -36,7 +36,6 @@ import {
3636} from 'protogen/redpanda/api/dataplane/v1/topic_pb' ;
3737import { MCPServer_State , MCPServer_Tool_ComponentType } from 'protogen/redpanda/api/dataplane/v1alpha3/mcp_pb' ;
3838import { useEffect , useRef , useState } from 'react' ;
39- import { useGetKafkaInfoQuery } from 'react-query/api/cluster-status' ;
4039import {
4140 type MCPStreamProgress ,
4241 useGetMCPServerQuery ,
@@ -202,13 +201,6 @@ export const RemoteMCPInspectorTab = () => {
202201 hideInternalTopics : true ,
203202 } ) ;
204203 const { mutateAsync : createTopic } = useCreateTopicMutation ( ) ;
205- // Clamp RF to broker count so single-broker clusters (e.g. local-byoc) don't
206- // fail CreateTopic with "not enough replicas". Fall back to the default if
207- // the KafkaInfo query hasn't resolved yet.
208- const { data : kafkaInfo } = useGetKafkaInfoQuery ( ) ;
209- const brokersOnline = kafkaInfo ?. brokersOnline ?? 0 ;
210- const effectiveReplicationFactor =
211- brokersOnline > 0 ? Math . min ( DEFAULT_TOPIC_REPLICATION_FACTOR , brokersOnline ) : DEFAULT_TOPIC_REPLICATION_FACTOR ;
212204
213205 useEffect ( ( ) => {
214206 if ( ! selectedTool && mcpServerTools ?. tools && mcpServerTools . tools . length === 1 ) {
@@ -572,7 +564,7 @@ export const RemoteMCPInspectorTab = () => {
572564 topic : create ( CreateTopicRequest_TopicSchema , {
573565 name : newTopicName ,
574566 partitionCount : DEFAULT_TOPIC_PARTITION_COUNT ,
575- replicationFactor : effectiveReplicationFactor ,
567+ replicationFactor : DEFAULT_TOPIC_REPLICATION_FACTOR ,
576568 configs : [
577569 create ( CreateTopicRequest_Topic_ConfigSchema , {
578570 name : 'cleanup.policy' ,
0 commit comments