fix: resolve 401 Unauthorized for Gemma by using the valid common API key
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 13s
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 13s
This commit is contained in:
@@ -99,7 +99,7 @@ public class ChatController {
|
|||||||
if ("Qwen3-Coder".equalsIgnoreCase(selectedModel) || "Gemma-4-31B".equalsIgnoreCase(selectedModel)) {
|
if ("Qwen3-Coder".equalsIgnoreCase(selectedModel) || "Gemma-4-31B".equalsIgnoreCase(selectedModel)) {
|
||||||
// 사내 LiteLLM 환경 동적 ChatModel 생성
|
// 사내 LiteLLM 환경 동적 ChatModel 생성
|
||||||
String liteLlmBaseUrl = "https://dev-iam-litellm.shinhanlife.co.kr:18020";
|
String liteLlmBaseUrl = "https://dev-iam-litellm.shinhanlife.co.kr:18020";
|
||||||
String apiKey = "Gemma-4-31B".equalsIgnoreCase(selectedModel) ? "sk-EH107wYBZuU6RUTqthR17A" : "sk-UJ2IRenvaMPbY3ozQdj6zw";
|
String apiKey = "sk-UJ2IRenvaMPbY3ozQdj6zw";
|
||||||
|
|
||||||
org.springframework.ai.openai.api.OpenAiApi openAiApi = org.springframework.ai.openai.api.OpenAiApi.builder()
|
org.springframework.ai.openai.api.OpenAiApi openAiApi = org.springframework.ai.openai.api.OpenAiApi.builder()
|
||||||
.baseUrl(liteLlmBaseUrl)
|
.baseUrl(liteLlmBaseUrl)
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ public class ScaffoldingController {
|
|||||||
|
|
||||||
if ("Qwen3-Coder".equalsIgnoreCase(resolvedModel) || "Gemma-4-31B".equalsIgnoreCase(resolvedModel)) {
|
if ("Qwen3-Coder".equalsIgnoreCase(resolvedModel) || "Gemma-4-31B".equalsIgnoreCase(resolvedModel)) {
|
||||||
String liteLlmBaseUrl = "https://dev-iam-litellm.shinhanlife.co.kr:18020";
|
String liteLlmBaseUrl = "https://dev-iam-litellm.shinhanlife.co.kr:18020";
|
||||||
String apiKey = "Gemma-4-31B".equalsIgnoreCase(resolvedModel) ? "sk-EH107wYBZuU6RUTqthR17A" : "sk-UJ2IRenvaMPbY3ozQdj6zw";
|
String apiKey = "sk-UJ2IRenvaMPbY3ozQdj6zw";
|
||||||
|
|
||||||
org.springframework.ai.openai.api.OpenAiApi openAiApi = org.springframework.ai.openai.api.OpenAiApi.builder()
|
org.springframework.ai.openai.api.OpenAiApi openAiApi = org.springframework.ai.openai.api.OpenAiApi.builder()
|
||||||
.baseUrl(liteLlmBaseUrl)
|
.baseUrl(liteLlmBaseUrl)
|
||||||
|
|||||||
Reference in New Issue
Block a user