[Bug]: <latest k8sgpt opeator with bedrock shows error -ValidationException: max_tokens_to_sample: range: 1..1,000,000>
Closed this issue · 3 comments
angelaaaaaaaw commented
Checklist
- I've searched for similar issues and couldn't find anything matching
- I've included steps to reproduce the behavior
Affected Components
- K8sGPT (CLI)
- K8sGPT Operator
K8sGPT Version
0.2.0
Kubernetes Version
1.31
Host OS and its Version
linux
Steps to reproduce
1 helm installed latest k8sgpt opeator
release k8sgpt-operator-system 1 2024-10-14 11:56:43.908409 +1100 AEDTdeployed k8sgpt-operator-0.2.0 0.0.26
2 - apply the bedrock ai backend
apiVersion: core.k8sgpt.ai/v1alpha1
kind: K8sGPT
metadata:
name: k8sgpt-bedrock
namespace: k8sgpt-operator-system
spec:
ai:
enabled: true
model: anthropic.claude-v2
region: us-west-2
backend: amazonbedrock
language: english
noCache: false
repository: ghcr.io/k8sgpt-ai/k8sgpt
version: v0.3.41
3 - error from controller manager
2024-10-14T11:07:54Z INFO k8sgpt-controller starting AnalysisStep
Finished Reconciling k8sGPT with error: failed to call Analyze RPC: rpc error: code = Unknown desc = failed while calling AI provider amazonbedrock: ValidationException: max_tokens_to_sample: range: 1..1,000,000
2024-10-14T11:07:59Z ERROR Reconciler error {"controller": "k8sgpt", "controllerGroup": "core.k8sgpt.ai", "controllerKind": "K8sGPT", "K8sGPT": {"name":"k8sgpt-bedrock","namespace":"k8sgpt-operator-system"}, "namespace": "k8sgpt-operator-system", "name": "k8sgpt-bedrock", "reconcileID": "908c7493-8419-42e8-b8b7-b5f670d591f0", "error": "failed to call Analyze RPC: rpc error: code = Unknown desc = failed while calling AI provider amazonbedrock: ValidationException: max_tokens_to_sample: range: 1..1,000,000"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:324
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:265
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:226
Expected behaviour
Previous k8s-gpt-opeator version works fine, expected the ValidationException error resolved
Actual behaviour
No response
Additional Information
No response
universam1 commented
same here, adding Bedrock error log:
{
"schemaType": "ModelInvocationLog",
"schemaVersion": "1.0",
"timestamp": "2024-12-02T16:05:59Z",
"accountId": "xxxxx",
"identity": {
"arn": "arn:aws:sts::xxxxx:assumed-role/xxxxx/1733155559580086216"
},
"region": "us-east-1",
"requestId": "85a13895-393d-4150-bb84-xxxx",
"operation": "InvokeModel",
"modelId": "anthropic.claude-v2",
"errorCode": "ValidationException"
}
@angelaaaaaaaw @AlexsJones do you have a workaround?
universam1 commented
looks like it is working with https://github.com/k8sgpt-ai/k8sgpt/releases/tag/v0.3.47
AlexsJones commented
Thanks @universam1 this was fixed in v0.3.44 I believe.