Skip to content

Commit d30dbcc

Browse files
authored
fix: extend request timeout to resolve MCP listTools timeout and add license headers (#132)
1 parent 91b9eee commit d30dbcc

File tree

149 files changed

+2135
-432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+2135
-432
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ build/
3131
### VS Code ###
3232
.vscode/
3333

34+
### AI Coding Assistants ###
35+
.cursor/
36+
.qoder/
37+
3438
### Mac OS ###
3539
.DS_Store
3640

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
HiMarket is an enterprise-grade AI open platform built on Higress AI Gateway, helping enterprises build private AI capability marketplace to uniformly manage and distribute AI resources such as LLM, MCP Server, and Agent. The platform encapsulates distributed AI capabilities into standardized API products, supports multi-version management and gray-scale release, provides self-service developer portal, and features comprehensive enterprise-level operation capabilities including security control, observability analysis, metering and billing, making AI resource sharing and reuse efficient and convenient.
4141

42-
4342
<div align="center">
4443
<img src="https://github.com/user-attachments/assets/645a3962-2f0a-412e-b501-e8eb6fc50bb1" alt="HiMarket 核心能力" width="700px" />
4544
<br/>
@@ -60,7 +59,6 @@ HiMarket system architecture consists of three layers:
6059
2. **AI Open Platform Admin**: Management platform for administrators to create and customize portals, manage AI resources such as MCP Server, Model, and Agent, including setting authentication policies and subscription approval workflows. The admin portal also provides observability dashboard to help administrators monitor AI resource usage and operational status in real-time.
6160
3. **AI Open Platform Portal**: Developer-facing portal site, also known as AI Marketplace or AI Hub, providing one-stop self-service where developers can complete identity registration, credential application, product browsing and subscription, online debugging, and more.
6261

63-
6462
<table>
6563
<tr>
6664
<td align="center">

himarket-bootstrap/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111

1212
<artifactId>himarket-bootstrap</artifactId>
1313

14-
<properties>
15-
<maven.compiler.source>17</maven.compiler.source>
16-
<maven.compiler.target>17</maven.compiler.target>
17-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18-
</properties>
19-
2014
<dependencies>
2115
<dependency>
2216
<groupId>com.alibaba.himarket</groupId>
@@ -47,7 +41,6 @@
4741
<plugin>
4842
<groupId>org.springframework.boot</groupId>
4943
<artifactId>spring-boot-maven-plugin</artifactId>
50-
<version>3.2.5</version>
5144
<configuration>
5245
<includeSystemScope>true</includeSystemScope>
5346
<jvmArguments>
@@ -68,7 +61,6 @@
6861
<plugin>
6962
<groupId>org.apache.maven.plugins</groupId>
7063
<artifactId>maven-compiler-plugin</artifactId>
71-
<version>3.11.0</version>
7264
<configuration>
7365
<parameters>true</parameters>
7466
<source>${java.version}</source>

himarket-bootstrap/src/main/java/com/alibaba/himarket/config/FlywayConfig.java

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
package com.alibaba.himarket.config;
221

322
import javax.sql.DataSource;
@@ -9,11 +28,6 @@
928
import org.springframework.context.annotation.Configuration;
1029
import org.springframework.context.annotation.Primary;
1130

12-
/**
13-
* Auto-repair checksum errors. Set app.flyway.auto-repair=false to disable.
14-
*
15-
* @author zh
16-
*/
1731
@Slf4j
1832
@Configuration
1933
public class FlywayConfig {

himarket-bootstrap/src/main/java/com/alibaba/himarket/config/SecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.alibaba.himarket.core.security.DeveloperAuthenticationProvider;
2323
import com.alibaba.himarket.core.security.JwtAuthenticationFilter;
2424
import jakarta.servlet.DispatcherType;
25-
import java.util.*;
25+
import java.util.Collections;
2626
import lombok.RequiredArgsConstructor;
2727
import lombok.extern.slf4j.Slf4j;
2828
import org.springframework.context.annotation.Bean;

himarket-bootstrap/src/main/java/com/alibaba/himarket/config/WebMvcConfig.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@
2121

2222
import java.util.List;
2323
import org.jetbrains.annotations.NotNull;
24-
import org.springframework.beans.factory.annotation.Qualifier;
2524
import org.springframework.context.annotation.Bean;
2625
import org.springframework.context.annotation.Configuration;
27-
import org.springframework.core.task.AsyncTaskExecutor;
2826
import org.springframework.data.domain.PageRequest;
2927
import org.springframework.data.domain.Sort;
3028
import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
3129
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
32-
import org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer;
3330
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
3431

3532
@Configuration
@@ -48,20 +45,13 @@ public PageableHandlerMethodArgumentResolver pageableResolver() {
4845
}
4946

5047
@Bean
51-
public WebMvcConfigurer webMvcConfigurer(
52-
@Qualifier("taskExecutor") AsyncTaskExecutor taskExecutor) {
48+
public WebMvcConfigurer webMvcConfigurer() {
5349
return new WebMvcConfigurer() {
5450
@Override
5551
public void addArgumentResolvers(
5652
@NotNull List<HandlerMethodArgumentResolver> resolvers) {
5753
resolvers.add(pageableResolver());
5854
}
59-
60-
@Override
61-
public void configureAsyncSupport(@NotNull AsyncSupportConfigurer configurer) {
62-
configurer.setTaskExecutor(taskExecutor);
63-
configurer.setDefaultTimeout(30000);
64-
}
6555
};
6656
}
6757
}

himarket-bootstrap/src/main/java/com/alibaba/himarket/filter/PortalResolvingFilter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ protected void doFilterInternal(
6464
}
6565

6666
log.debug(
67-
"域名解析调试 - Origin: {}, Host: {}, X-Forwarded-Host: {}, ServerName: {}, X-Real-IP: {}, X-Forwarded-For: {}",
67+
"域名解析调试 - Origin: {}, Host: {}, X-Forwarded-Host: {}, ServerName: {},"
68+
+ " X-Real-IP: {}, X-Forwarded-For: {}",
6869
origin,
6970
host,
7071
xForwardedHost,

himarket-dal/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111

1212
<artifactId>himarket-dal</artifactId>
1313

14-
<properties>
15-
<maven.compiler.source>17</maven.compiler.source>
16-
<maven.compiler.target>17</maven.compiler.target>
17-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18-
</properties>
19-
2014
<dependencies>
2115
<dependency>
2216
<groupId>org.springframework.boot</groupId>
@@ -41,7 +35,6 @@
4135
<dependency>
4236
<groupId>com.fasterxml.jackson.core</groupId>
4337
<artifactId>jackson-databind</artifactId>
44-
<version>2.14.0-rc1</version>
4538
</dependency>
4639
</dependencies>
4740

himarket-dal/src/main/java/com/alibaba/himarket/converter/ChatUsageConverter.java

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
package com.alibaba.himarket.converter;
221

322
import com.alibaba.himarket.support.chat.ChatUsage;
423
import jakarta.persistence.Converter;
524

6-
/**
7-
* @author zh
8-
*/
925
@Converter(autoApply = true)
1026
public class ChatUsageConverter extends JsonConverter<ChatUsage> {
1127

himarket-dal/src/main/java/com/alibaba/himarket/converter/IconConverter.java

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
package com.alibaba.himarket.converter;
221

322
import com.alibaba.himarket.support.product.Icon;
423
import jakarta.persistence.Converter;
524

6-
/**
7-
* @author zh
8-
*/
925
@Converter(autoApply = true)
1026
public class IconConverter extends JsonConverter<Icon> {
1127

0 commit comments

Comments
 (0)